Skip to content

Commit

Permalink
Updated scheduling for mock drill
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay-debug committed Nov 1, 2023
1 parent 0498534 commit 7a350f6
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/api/enrollment/enrollment/enrollment.controller.delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,21 @@ export class EnrollmentControllerDelegate {
}
let dt = null;

dt = TimeHelper.addDuration(startDate, daysToAdd, DurationType.Day);
dt = TimeHelper.addDuration(dt, 270, DurationType.Minute);
const reminder = daysToAdd % 4;
const days = Math.ceil(daysToAdd / 4);
dt = TimeHelper.addDuration(startDate, days, DurationType.Day);
if (reminder === 1) {
dt = TimeHelper.addDuration(dt, 360, DurationType.Minute);
} else if (reminder === 2) {
dt = TimeHelper.addDuration(dt, 360 + 120 * 1, DurationType.Minute);
} else if (reminder === 3) {
dt = TimeHelper.addDuration(dt, 360 + 120 * 2, DurationType.Minute);
} else if (reminder === 0) {
dt = TimeHelper.addDuration(dt, 360 + 120 * 3, DurationType.Minute);
}

// dt = TimeHelper.addDuration(startDate, daysToAdd, DurationType.Day);
// dt = TimeHelper.addDuration(dt, 270, DurationType.Minute);

var createModel: EnrollmentTaskCreateModel = {
EnrollmentId : record.id,
Expand Down

0 comments on commit 7a350f6

Please sign in to comment.