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:
@@ -1,6 +1,6 @@
|
||||
import { useMutation, useQuery, useApolloClient } from "@apollo/client";
|
||||
import { Form, Modal, notification } from "antd";
|
||||
import moment from "moment";
|
||||
import dayjs from "../../utils/day";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -108,7 +108,7 @@ export function PartsOrderModalContainer({
|
||||
po: [
|
||||
{
|
||||
...values,
|
||||
order_date: moment().format("YYYY-MM-DD"),
|
||||
order_date: dayjs().format("YYYY-MM-DD"),
|
||||
orderedby: currentUser.email,
|
||||
jobid: jobId,
|
||||
user_email: currentUser.email,
|
||||
@@ -185,7 +185,7 @@ export function PartsOrderModalContainer({
|
||||
vendorid: bodyshop.inhousevendorid,
|
||||
invoice_number: "ih",
|
||||
isinhouse: true,
|
||||
date: new moment(),
|
||||
date: new dayjs(),
|
||||
total: 0,
|
||||
billlines: values.parts_order_lines.data.map((p) => {
|
||||
return {
|
||||
@@ -318,7 +318,7 @@ export function PartsOrderModalContainer({
|
||||
const initialValues = {
|
||||
jobid: jobId,
|
||||
return: isReturn,
|
||||
deliver_by: isReturn ? moment(new Date()) : null,
|
||||
deliver_by: isReturn ? dayjs(new Date()) : null,
|
||||
vendorid: vendorId,
|
||||
returnfrombill: returnFromBill,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user