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,8 +1,7 @@
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { Button, Card, Form, notification, Space } from "antd";
|
||||
import axios from "axios";
|
||||
import moment from "moment";
|
||||
import momenttz from "moment-timezone";
|
||||
import dayjs from "../../utils/day";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -58,13 +57,14 @@ export function TechClockInContainer({
|
||||
employeeid: technician.id,
|
||||
date:
|
||||
typeof bodyshop.timezone === "string"
|
||||
? momenttz.tz(theTime, bodyshop.timezone).format("YYYY-MM-DD")
|
||||
// TODO: Client Update - This may be broken
|
||||
? dayjs.tz(theTime, bodyshop.timezone).format("YYYY-MM-DD")
|
||||
: typeof bodyshop.timezone === "number"
|
||||
? moment(theTime)
|
||||
? dayjs(theTime)
|
||||
.format("YYYY-MM-DD")
|
||||
.utcOffset(bodyshop.timezone)
|
||||
: moment(theTime).format("YYYY-MM-DD"),
|
||||
clockon: moment(theTime),
|
||||
: dayjs(theTime).format("YYYY-MM-DD"),
|
||||
clockon: dayjs(theTime),
|
||||
jobid: values.jobid,
|
||||
cost_center: values.cost_center,
|
||||
ciecacode:
|
||||
|
||||
Reference in New Issue
Block a user