Skip to content

Commit

Permalink
Merge pull request #2055 from bcgov/feature/TCVP-3070
Browse files Browse the repository at this point in the history
TCVP-3070 Show 'Confirm Dialog' Info in Require Court Hearing / Adjourn Pop-up
  • Loading branch information
saikrishnametpalli-nttdata authored Jan 24, 2025
2 parents 1309baf + a3cb00a commit 5b75f15
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,12 @@ export class JJDisputeComponent implements OnInit {
element?.nativeElement.scrollIntoView({ behavior: 'smooth' });
}

onConfirm(): void {
onConfirm(): void {
// TCVP-3082: Set dueDate values to current date before opening the dialog
let today = new Date().toISOString();
this.lastUpdatedJJDispute.jjDisputedCounts.forEach(count => {
if (!count.revisedDueDate) {
count.revisedDueDate = new Date().toISOString();
if (!count.revisedDueDate && count.jjDisputedCountRoP.finding === JJDisputedCountRoPFinding.Guilty) {
count.revisedDueDate = today;
}
});

Expand All @@ -264,6 +265,13 @@ export class JJDisputeComponent implements OnInit {
}

onRequireCourtHearing() {
let today = new Date().toISOString();
this.lastUpdatedJJDispute.jjDisputedCounts.forEach(count => {
if (!count.revisedDueDate && count.jjDisputedCountRoP.finding === JJDisputedCountRoPFinding.Guilty) {
count.revisedDueDate = today;
}
});

const data: DialogOptions = {
titleKey: this.lastUpdatedJJDispute.hearingType === this.HearingType.WrittenReasons ? "Adjourn / Require Hearing?" : "Adjourn / Continue?",
messageKey: this.lastUpdatedJJDispute.hearingType === this.HearingType.WrittenReasons ?
Expand Down

0 comments on commit 5b75f15

Please sign in to comment.