- Fix bug with lowercase yyyy formatting.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -37,6 +37,7 @@ export function ScheduleCalendarHeaderComponent({
|
||||
events,
|
||||
...otherProps
|
||||
}) {
|
||||
console.log(`ScheduleCalendarHeaderComponent: ${label} Calculating: ${calculating}`)
|
||||
const ATSToday = useMemo(() => {
|
||||
if (!events) return [];
|
||||
return _.groupBy(
|
||||
|
||||
@@ -20,7 +20,7 @@ export function ScoreboardLastDays({ bodyshop, sbEntriesByDate }) {
|
||||
|
||||
const ArrayOfDate = [];
|
||||
for (var i = lastNumberWorkingDays - 1; i >= 0; i--) {
|
||||
ArrayOfDate.push(dayjs().businessDaysSubtract(i, "day").format("yyyy-MM-DD"));
|
||||
ArrayOfDate.push(dayjs().businessDaysSubtract(i, "day").format("YYYY-MM-DD"));
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -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