Skip to content

Commit

Permalink
Merge pull request #5 from bharathravi-in/gcp-prod-fixes
Browse files Browse the repository at this point in the history
Gcp prod fixes
  • Loading branch information
vishnubansaltarento authored Aug 14, 2024
2 parents 90651a6 + be3a5fb commit 3f70bdc
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -751,17 +751,21 @@ export class AppTocHomeComponent implements OnInit, OnDestroy, AfterViewChecked,
if (batch && this.currentCourseBatchId) {
this.startDate = (_.get(batch, 'startDate'))
this.endDate = (_.get(batch, 'endDate'))
const startDateTime = this.startDate && new Date(this.startDate).getTime()
const endDateTime = this.endDate && new Date(this.endDate).getTime()
this.startDateDifference = now - startDateTime
this.endDateDifference = endDateTime - now
if (this.endDateDifference > 0 && this.startDateDifference > 0 && batch.status !== 2) {
return true
if (this.endDate) {
const startDateTime = this.startDate && new Date(this.startDate).getTime()
const endDateTime = this.endDate && new Date(this.endDate).getTime()
this.startDateDifference = now - startDateTime
this.endDateDifference = endDateTime - now
if (this.endDateDifference > 0 && this.startDateDifference > 0 && batch.status !== 2) {
return true
}
return false
}
return false
return true
}
return false
} return false
}
return false
}

private initData(data: Data) {
Expand Down

0 comments on commit 3f70bdc

Please sign in to comment.