IO-2162 Resolve smart scheduling issues.

This commit is contained in:
Patrick Fic
2023-02-03 11:48:07 -08:00
parent 2108a4e96c
commit 563c1d2402
3 changed files with 19 additions and 0 deletions

View File

@@ -92,6 +92,18 @@ export function* calculateScheduleLoad({ payload: end }) {
code: "Job has no scheduled in date",
});
}
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",
});
}
if (item.actual_in && moment(item.actual_in).isAfter(moment())) {
problemJobs.push({
...item,
code: "Job has an actual in date set in the future",
});
}
if (
item.actual_completion &&
moment(item.actual_completion).isAfter(moment())