- 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,
|
events,
|
||||||
...otherProps
|
...otherProps
|
||||||
}) {
|
}) {
|
||||||
|
console.log(`ScheduleCalendarHeaderComponent: ${label} Calculating: ${calculating}`)
|
||||||
const ATSToday = useMemo(() => {
|
const ATSToday = useMemo(() => {
|
||||||
if (!events) return [];
|
if (!events) return [];
|
||||||
return _.groupBy(
|
return _.groupBy(
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export function ScoreboardLastDays({ bodyshop, sbEntriesByDate }) {
|
|||||||
|
|
||||||
const ArrayOfDate = [];
|
const ArrayOfDate = [];
|
||||||
for (var i = lastNumberWorkingDays - 1; i >= 0; i--) {
|
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 (
|
return (
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const itemDate = dayjs(item.actual_in || item.scheduled_in).format(
|
const itemDate = dayjs(item.actual_in || item.scheduled_in).format(
|
||||||
"yyyy-MM-DD"
|
"YYYY-MM-DD"
|
||||||
);
|
);
|
||||||
|
|
||||||
const AddJobForSchedulingCalc = !item.inproduction;
|
const AddJobForSchedulingCalc = !item.inproduction;
|
||||||
@@ -171,7 +171,7 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
|
|
||||||
const itemDate = dayjs(
|
const itemDate = dayjs(
|
||||||
item.actual_completion || item.scheduled_completion
|
item.actual_completion || item.scheduled_completion
|
||||||
).format("yyyy-MM-DD");
|
).format("YYYY-MM-DD");
|
||||||
//Skip it, it's already completed.
|
//Skip it, it's already completed.
|
||||||
|
|
||||||
if (!!load[itemDate]) {
|
if (!!load[itemDate]) {
|
||||||
@@ -209,10 +209,10 @@ export function* calculateScheduleLoad({ payload: end }) {
|
|||||||
|
|
||||||
const range = Math.round(dayjs.duration(end.diff(today)).asDays()) + 1;
|
const range = Math.round(dayjs.duration(end.diff(today)).asDays()) + 1;
|
||||||
for (var day = 0; day < range; day++) {
|
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)
|
const prev = dayjs(today)
|
||||||
.add(day - 1, "day")
|
.add(day - 1, "day")
|
||||||
.format("yyyy-MM-DD");
|
.format("YYYY-MM-DD");
|
||||||
if (!!!load[current]) {
|
if (!!!load[current]) {
|
||||||
load[current] = {};
|
load[current] = {};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user