IO-2162 remove unnecessary conditions.
This commit is contained in:
@@ -112,12 +112,7 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
"yyyy-MM-DD"
|
||||
);
|
||||
|
||||
const AddJobForSchedulingCalc =
|
||||
!item.inproduction &&
|
||||
!moment(item.actual_completion || item.scheduled_completion).isSame(
|
||||
moment(item.actual_in || item.scheduled_in),
|
||||
"day"
|
||||
);
|
||||
const AddJobForSchedulingCalc = !item.inproduction;
|
||||
|
||||
if (!!load[itemDate]) {
|
||||
load[itemDate].allHoursIn =
|
||||
@@ -160,13 +155,7 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
const inProdJobs = prodJobs.find((p) => p.id === item.id);
|
||||
const inArrJobs = arrJobs.find((p) => p.id === item.id);
|
||||
|
||||
const AddJobForSchedulingCalc =
|
||||
item.inproduction &&
|
||||
!moment(item.actual_completion || item.scheduled_completion).isSame(
|
||||
moment(item.scheduled_in),
|
||||
"day"
|
||||
) &&
|
||||
(inProdJobs || inArrJobs);
|
||||
const AddJobForSchedulingCalc = inProdJobs || inArrJobs;
|
||||
|
||||
const itemDate = moment(
|
||||
item.actual_completion || item.scheduled_completion
|
||||
|
||||
Reference in New Issue
Block a user