From 8d22248f4be74539f66593d20570d290a8e1ef45 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 6 Feb 2023 09:02:33 -0800 Subject: [PATCH] IO-2162 Resolve display issues on scheduling modal . --- .../schedule-job-modal/schedule-job-modal.component.jsx | 2 +- client/src/redux/application/application.sagas.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/schedule-job-modal/schedule-job-modal.component.jsx b/client/src/components/schedule-job-modal/schedule-job-modal.component.jsx index dbbc52569..fdfb9932c 100644 --- a/client/src/components/schedule-job-modal/schedule-job-modal.component.jsx +++ b/client/src/components/schedule-job-modal/schedule-job-modal.component.jsx @@ -201,7 +201,7 @@ export function ScheduleJobModalComponent({ {() => { const values = form.getFieldsValue(); if (values.start) { - calculateScheduleLoad(values.start); + calculateScheduleLoad(moment(values.start).add(3, "days")); } return (
diff --git a/client/src/redux/application/application.sagas.js b/client/src/redux/application/application.sagas.js index 02e86c6cc..447fed0e6 100644 --- a/client/src/redux/application/application.sagas.js +++ b/client/src/redux/application/application.sagas.js @@ -92,7 +92,7 @@ export function* calculateScheduleLoad({ payload: end }) { code: "Job has no scheduled in date", }); } - if(!item.actual_completion && item.actual_in && !item.inproduction){ + if (!item.actual_completion && item.actual_in && !item.inproduction) { problemJobs.push({ ...item, code: "Job has an actual in date, but no actual completion date and is not marked as in production", @@ -207,7 +207,7 @@ export function* calculateScheduleLoad({ payload: end }) { //Propagate the expected load to each day. - const range = Math.round(moment.duration(end.diff(today)).asDays()); + const range = Math.round(moment.duration(end.diff(today)).asDays()) + 1; for (var day = 0; day < range; day++) { const current = moment(today).add(day, "days").format("yyyy-MM-DD"); const prev = moment(today)