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

@@ -4,7 +4,7 @@ import { Button, Dropdown, Menu, Space, notification } from "antd";
import {PageHeader} from "@ant-design/pro-layout";
import i18next from "i18next";
import _ from "lodash";
import moment from "moment";
import dayjs from "../../utils/day";
import React, { useState } from "react";
import { Responsive, WidthProvider } from "react-grid-layout";
import { useTranslation } from "react-i18next";
@@ -277,7 +277,7 @@ const componentList = {
},
ScheduleInToday: {
label: i18next.t("dashboard.titles.scheduledintoday", {
date: moment().startOf("day").format("MM/DD/YYYY"),
date: dayjs().startOf("day").format("MM/DD/YYYY"),
}),
component: DashboardScheduledInToday,
gqlFragment: DashboardScheduledInTodayGql,
@@ -288,7 +288,7 @@ const componentList = {
},
ScheduleOutToday: {
label: i18next.t("dashboard.titles.scheduledouttoday", {
date: moment().startOf("day").format("MM/DD/YYYY"),
date: dayjs().startOf("day").format("MM/DD/YYYY"),
}),
component: DashboardScheduledOutToday,
gqlFragment: DashboardScheduledOutTodayGql,
@@ -311,10 +311,10 @@ const createDashboardQuery = (state) => {
${componentBasedAdditions || ""}
monthly_sales: jobs(where: {_and: [
{ voided: {_eq: false}},
{date_invoiced: {_gte: "${moment()
{date_invoiced: {_gte: "${dayjs()
.startOf("month")
.startOf("day")
.toISOString()}"}}, {date_invoiced: {_lte: "${moment()
.toISOString()}"}}, {date_invoiced: {_lte: "${dayjs()
.endOf("month")
.endOf("day")
.toISOString()}"}}]}) {