Skip to content

Commit

Permalink
Merge pull request #718 from bcgov/feature/ALCS-915
Browse files Browse the repository at this point in the history
Noi Tracking Fixes
  • Loading branch information
dhaselhan authored Jun 22, 2023
2 parents f60143c + 73b8502 commit 1291ddd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<mat-icon class="icon">pause</mat-icon>
{{ pausedDays }}
</div>
<div *ngIf="dueDate && !paused">
<div *ngIf="dueDate && activeDays !== null">
<span *ngIf="!isOverdue">Due: {{ dueDate | momentFormat }}</span>
<span class="red-text" *ngIf="isOverdue">Overdue</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export class TimeTrackerComponent implements OnChanges {
}

if (this.maxActiveDays) {
this.dueDate = moment().subtract(this.activeDays, 'days').add(this.maxActiveDays, 'days').toDate();
this.dueDate = moment()
.subtract(this.activeDays, 'days')
.add(this.maxActiveDays - 1, 'days')
.toDate();

if (this.dueDate && this.dueDate.getTime() < Date.now()) {
this.isOverdue = true;
Expand Down

0 comments on commit 1291ddd

Please sign in to comment.