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 { Card, Col, Row, Table } from "antd";
|
||||
import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import dayjs from "../../utils/day";
|
||||
import React, { useMemo, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -124,7 +124,7 @@ const JobRelatedTicketsTable = ({
|
||||
if (!!val.clockoff && !!val.clockon)
|
||||
return (
|
||||
acc +
|
||||
moment(val.clockoff).diff(moment(val.clockon), "hours", true)
|
||||
dayjs(val.clockoff).diff(dayjs(val.clockon), "hours", true)
|
||||
);
|
||||
return acc;
|
||||
}, 0);
|
||||
@@ -251,7 +251,7 @@ const ShiftRelatedTicketsTable = ({
|
||||
const clockHrs = item.tickets.reduce((acc, val) => {
|
||||
if (!!val.clockoff && !!val.clockon)
|
||||
return (
|
||||
acc + moment(val.clockoff).diff(moment(val.clockon), "hours", true)
|
||||
acc + dayjs(val.clockoff).diff(dayjs(val.clockon), "hours", true)
|
||||
);
|
||||
return acc;
|
||||
}, 0);
|
||||
|
||||
Reference in New Issue
Block a user