- Fix bug with lowercase yyyy formatting.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -121,7 +121,7 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
}
|
||||
|
||||
const itemDate = dayjs(item.actual_in || item.scheduled_in).format(
|
||||
"yyyy-MM-DD"
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
|
||||
const AddJobForSchedulingCalc = !item.inproduction;
|
||||
@@ -171,7 +171,7 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
|
||||
const itemDate = dayjs(
|
||||
item.actual_completion || item.scheduled_completion
|
||||
).format("yyyy-MM-DD");
|
||||
).format("YYYY-MM-DD");
|
||||
//Skip it, it's already completed.
|
||||
|
||||
if (!!load[itemDate]) {
|
||||
@@ -209,10 +209,10 @@ export function* calculateScheduleLoad({ payload: end }) {
|
||||
|
||||
const range = Math.round(dayjs.duration(end.diff(today)).asDays()) + 1;
|
||||
for (var day = 0; day < range; day++) {
|
||||
const current = dayjs(today).add(day, "day").format("yyyy-MM-DD");
|
||||
const current = dayjs(today).add(day, "day").format("YYYY-MM-DD");
|
||||
const prev = dayjs(today)
|
||||
.add(day - 1, "day")
|
||||
.format("yyyy-MM-DD");
|
||||
.format("YYYY-MM-DD");
|
||||
if (!!!load[current]) {
|
||||
load[current] = {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user