Skip to content

Commit

Permalink
Merge pull request #2068 from bcgov/feature/TCVP-3163-show-ttp-date-o…
Browse files Browse the repository at this point in the history
…n-final-disposition

TCVP-3163: Fix TTP date on final disposition
  • Loading branch information
karahanb authored Feb 25, 2025
2 parents 7fb572c + 4a02379 commit ee9035e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ export class JJCountComponent implements OnInit, OnChanges {
this.fineReduction = this.jjDisputedCount ? (this.jjDisputedCount.totalFineAmount &&
this.jjDisputedCount.lesserOrGreaterAmount ? (this.jjDisputedCount.lesserOrGreaterAmount !== null &&
this.jjDisputedCount.lesserOrGreaterAmount != this.jjDisputedCount.ticketedFineAmount ?
"yes" : "no") : "") : "";
this.timeToPay = this.jjDisputedCount ? ((this.jjDisputedCount.revisedDueDate && this.jjDisputeInfo.jjDecisionDate) ?
"yes" : "no") : "") : "";
let today = new Date();
this.timeToPay = this.jjDisputedCount ? ((this.jjDisputedCount.revisedDueDate) ?
(new Date(this.jjDisputedCount.dueDate).getDate() != new Date(this.jjDisputedCount.revisedDueDate).getDate()
&& this.jjDisputedCount.revisedDueDate.split('T')[0] != this.jjDisputeInfo.jjDecisionDate.split('T')[0]
&& this.jjDisputedCount.revisedDueDate.split('T')[0] != today.toISOString().split('T')[0]
? "yes" : "no") : "") : "";
this.bindRevisedDueDate(this.jjDisputedCount.revisedDueDate);
this.updateInclSurcharge(this.inclSurcharge);
Expand Down Expand Up @@ -286,6 +287,7 @@ export class JJCountComponent implements OnInit, OnChanges {
this.jjDisputedCount = { ...this.jjDisputedCount, ...this.countForm.value };
if (this.jjDisputedCount.revisedDueDate) {
let revisedDueDate = new Date(this.jjDisputedCount.revisedDueDate);
revisedDueDate.setDate(revisedDueDate.getDate() + 1);
revisedDueDate.setHours(0, 0, 0, 0);
this.jjDisputedCount.revisedDueDate = revisedDueDate.toISOString().slice(0, 10);
}
Expand Down

0 comments on commit ee9035e

Please sign in to comment.