Skip to content

Commit

Permalink
Merge pull request #549 from williamrosswhite/williamrosswhite/EMBCDF…
Browse files Browse the repository at this point in the history
…A-1229--past-applications-show-closed-applications-immediately-not-after-61-days

EMBCDFA-1229 -  Portal: Past Applications Displaying Closed Applications Immediately, Not After 61 Days
  • Loading branch information
GeorgeWalker authored Sep 3, 2024
2 parents 1cbf28a + 24bb335 commit 9846c38
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,23 @@ export class DashboardComponent implements OnInit {
}

countAppData(lstApp: Object): void {
var res = JSON.parse(JSON.stringify(lstApp));
let lstApplications = res;
this.currentApplicationsCount = 0; this.pastApplicationsCount = 0;

let lstApplications = JSON.parse(JSON.stringify(lstApp));

this.currentApplicationsCount = 0;
this.pastApplicationsCount = 0;

lstApplications.forEach(x => {
if (
(x.status.toLowerCase() === "dfa decision made"
|| x.status.toLowerCase() === "closed: inactive" || x.status.toLowerCase() === "closed: withdrawn")
&&
(x.dateFileClosed && (this.sixtyOneDaysAgo <= new Date(x.dateFileClosed).getTime()))) {
(x.dateFileClosed && (new Date(x.dateFileClosed).getTime() <= this.sixtyOneDaysAgo))) {
this.pastApplicationsCount++;
} else this.currentApplicationsCount++;
})
} else {
this.currentApplicationsCount++;
}
});
}

navigateToDFAPrescreening(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,15 @@ export class DfaApplicationComponent implements OnInit {
}

mapData(lstApp: Object): void {
var res = JSON.parse(JSON.stringify(lstApp));
this.lstApplications = res;

this.lstApplications = JSON.parse(JSON.stringify(lstApp));

this.lstApplications.forEach(x => {
if (
(x.status.toLowerCase() === "dfa decision made"
|| x.status.toLowerCase() === "closed: inactive" || x.status.toLowerCase() === "closed: withdrawn")
&&
(x.dateFileClosed && (this.sixtyOneDaysAgo <= new Date(x.dateFileClosed).getTime()))) {
(x.dateFileClosed && (new Date(x.dateFileClosed).getTime() <= this.sixtyOneDaysAgo))) {
x.currentApplication = false;
} else x.currentApplication = true;
})
Expand Down

0 comments on commit 9846c38

Please sign in to comment.