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:
@@ -10,7 +10,7 @@ import {
|
||||
Select,
|
||||
Space,
|
||||
} from "antd";
|
||||
import moment from "moment";
|
||||
import dayjs from "../../utils/day";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -110,7 +110,7 @@ export function JobsDetailHeaderAddEvent({ bodyshop, jobid, ...props }) {
|
||||
async validator(rule, value) {
|
||||
if (value) {
|
||||
const { start } = form.getFieldsValue();
|
||||
if (moment(start).isAfter(moment(value))) {
|
||||
if (dayjs(start).isAfter(dayjs(value))) {
|
||||
return Promise.reject(
|
||||
t("employees.labels.endmustbeafterstart")
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@ import Axios from "axios";
|
||||
import _ from "lodash";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { INSERT_NEW_JOB, QUERY_JOB_FOR_DUPE } from "../../graphql/jobs.queries";
|
||||
import moment from "moment";
|
||||
import dayjs from "../../utils/day";
|
||||
import i18n from "i18next";
|
||||
|
||||
export default async function DuplicateJob(
|
||||
@@ -92,7 +92,7 @@ export async function CreateIouForJob(
|
||||
converted: true,
|
||||
status: status,
|
||||
iouparent: jobId,
|
||||
date_open: moment(),
|
||||
date_open: dayjs(),
|
||||
audit_trails: {
|
||||
data: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user