Skip to content

Commit

Permalink
feat: Add outcome report to HWCR template
Browse files Browse the repository at this point in the history
  • Loading branch information
afwilcox committed Nov 18, 2024
1 parent 6c9707a commit 3a7777f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions backend/src/v1/complaint/complaint.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1705,10 +1705,35 @@ export class ComplaintService {
data.reportedOn = _applyTimezone(data.reportedOn, tz, "datetime");
data.updatedOn = _applyTimezone(data.updatedOn, tz, "datetime");

//Assessment Date - will only be either 0 or 1 actions in the array
if (data.outcome.assessmentDetails?.actions[0]?.date) {
data.outcome.assessmentDetails.actions[0].date = _applyTimezone(
data.outcome.assessmentDetails.actions[0].date,
tz,
"date",
);
}

//Prevention and Education Date - will only be either 0 or 1 actions in the array
if (data.outcome.preventionDetails?.actions[0]?.date) {
data.outcome.preventionDetails.actions[0].date = _applyTimezone(
data.outcome.preventionDetails.actions[0].date,
tz,
"date",
);
}

//Notes - No Action Array
if (data.outcome.note) {
data.outcome.note.action.date = _applyTimezone(data.outcome.note.action.date, tz, "date");
}

//File Review Date - No Action Array
if (data.outcome.reviewComplete?.date) {
data.outcome.reviewComplete.date = _applyTimezone(data.outcome.reviewComplete.date, tz, "date");
}

//CEEB Decision - No Action Array
if (data.outcome.decision?.actionTakenDate) {
data.outcome.decision.actionTakenDate = _applyTimezone(data.outcome.decision.actionTakenDate, tz, "date");
}
Expand Down
Binary file not shown.

0 comments on commit 3a7777f

Please sign in to comment.