This is a breaking change, moment is no longer with us, let us have a dayjs of silence.

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2023-12-13 19:06:15 -05:00
parent 25173b0903
commit 65157a094f
97 changed files with 772 additions and 592 deletions

View File

@@ -1,6 +1,6 @@
import { useMutation } from "@apollo/client";
import { Button, Card, Form, Input, notification, Switch } from "antd";
import moment from "moment-business-days";
import dayjs from "../../../../utils/day";
import queryString from "query-string";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -87,7 +87,7 @@ export function JobChecklistForm({
bodyshop.intakechecklist &&
bodyshop.intakechecklist.next_contact_hours &&
bodyshop.intakechecklist.next_contact_hours > 0 && {
date_next_contact: moment().add(
date_next_contact: dayjs().add(
bodyshop.intakechecklist.next_contact_hours,
"hours"
),
@@ -218,26 +218,26 @@ export function JobChecklistForm({
scheduled_completion:
(job &&
job.scheduled_completion &&
moment(job.scheduled_completion)) ||
dayjs(job.scheduled_completion)) ||
(job &&
job.labhrs &&
job.larhrs &&
moment().businessAdd(
dayjs().businessDaysAdd(
(job.labhrs.aggregate.sum.mod_lb_hrs ||
0 + job.larhrs.aggregate.sum.mod_lb_hrs ||
0) / bodyshop.target_touchtime,
"days"
)),
scheduled_delivery:
job.scheduled_delivery && moment(job.scheduled_delivery),
job.scheduled_delivery && dayjs(job.scheduled_delivery),
production_vars: job.production_vars,
}),
...(type === "deliver" && {
removeFromProduction: true,
actual_completion:
job && job.actual_completion && moment(job.actual_completion),
job && job.actual_completion && dayjs(job.actual_completion),
actual_delivery:
job && job.actual_delivery && moment(job.actual_delivery),
job && job.actual_delivery && dayjs(job.actual_delivery),
}),
...formItems
.filter((fi) => fi.value)