@@ -104,7 +104,7 @@ export function App({
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Any route that is not assigned and matched will default to the Landing Page component
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={<LoadingSpinner message="ImEX Online"/>}>
|
<Suspense fallback={<LoadingSpinner message="ImEX Online"/>}>
|
||||||
<Routes>
|
<Routes>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Icon, {UploadOutlined} from "@ant-design/icons";
|
import Icon, {UploadOutlined} from "@ant-design/icons";
|
||||||
import {useApolloClient} from "@apollo/client";
|
import {useApolloClient} from "@apollo/client";
|
||||||
import {useTreatments} from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import {Alert, Divider, Form, Input, Select, Space, Statistic, Switch, Upload,} from "antd";
|
import {Alert, Divider, Form, Input, Select, Space, Statistic, Switch, Upload,} from "antd";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import React, {useEffect, useState} from "react";
|
import React, {useEffect, useState} from "react";
|
||||||
@@ -27,34 +27,18 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({});
|
const mapDispatchToProps = (dispatch) => ({});
|
||||||
|
|
||||||
export function BillFormComponent({
|
export function BillFormComponent({bodyshop, disabled, form, vendorAutoCompleteOptions, lineData, responsibilityCenters, loadLines, billEdit, disableInvNumber, job, loadOutstandingReturns, loadInventory, preferredMake}) {
|
||||||
bodyshop,
|
|
||||||
disabled,
|
|
||||||
form,
|
|
||||||
vendorAutoCompleteOptions,
|
|
||||||
lineData,
|
|
||||||
responsibilityCenters,
|
|
||||||
loadLines,
|
|
||||||
billEdit,
|
|
||||||
disableInvNumber,
|
|
||||||
job,
|
|
||||||
loadOutstandingReturns,
|
|
||||||
loadInventory,
|
|
||||||
preferredMake,
|
|
||||||
}) {
|
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
const [discount, setDiscount] = useState(0);
|
const [discount, setDiscount] = useState(0);
|
||||||
const {Extended_Bill_Posting} = useTreatments(
|
|
||||||
["Extended_Bill_Posting"],
|
const { treatments: {Extended_Bill_Posting, ClosingPeriod} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["Extended_Bill_Posting", "ClosingPeriod"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
const {ClosingPeriod} = useTreatments(
|
});
|
||||||
["ClosingPeriod"],
|
|
||||||
{},
|
|
||||||
bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleVendorSelect = (props, opt) => {
|
const handleVendorSelect = (props, opt) => {
|
||||||
setDiscount(opt.discount);
|
setDiscount(opt.discount);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useLazyQuery, useQuery } from "@apollo/client";
|
import { useLazyQuery, useQuery } from "@apollo/client";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
@@ -23,11 +23,11 @@ export function BillFormContainer({
|
|||||||
disabled,
|
disabled,
|
||||||
disableInvNumber,
|
disableInvNumber,
|
||||||
}) {
|
}) {
|
||||||
const { Simple_Inventory } = useTreatments(
|
const { treatments: {Simple_Inventory} } = useSplitTreatments({
|
||||||
["Simple_Inventory"],
|
attributes: {},
|
||||||
{},
|
names: ["Simple_Inventory"],
|
||||||
bodyshop && bodyshop.imexshopid
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
);
|
});
|
||||||
|
|
||||||
const { data: VendorAutoCompleteData } = useQuery(
|
const { data: VendorAutoCompleteData } = useQuery(
|
||||||
SEARCH_VENDOR_AUTOCOMPLETE,
|
SEARCH_VENDOR_AUTOCOMPLETE,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { DeleteFilled, DollarCircleFilled } from "@ant-design/icons";
|
import { DeleteFilled, DollarCircleFilled } from "@ant-design/icons";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import {
|
import {
|
||||||
Button, Form,
|
Button, Form,
|
||||||
Input,
|
Input,
|
||||||
@@ -40,11 +40,14 @@ export function BillEnterModalLinesComponent({
|
|||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { setFieldsValue, getFieldsValue, getFieldValue } = form;
|
const { setFieldsValue, getFieldsValue, getFieldValue } = form;
|
||||||
const { Simple_Inventory } = useTreatments(
|
|
||||||
["Simple_Inventory"],
|
const { treatments: {Simple_Inventory} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop && bodyshop.imexshopid
|
names: ["Simple_Inventory"],
|
||||||
);
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
const columns = (remove) => {
|
const columns = (remove) => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
|||||||
import GlobalSearch from "../global-search/global-search.component";
|
import GlobalSearch from "../global-search/global-search.component";
|
||||||
import GlobalSearchOs from "../global-search/global-search-os.component";
|
import GlobalSearchOs from "../global-search/global-search-os.component";
|
||||||
import "./breadcrumbs.styles.scss";
|
import "./breadcrumbs.styles.scss";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
breadcrumbs: selectBreadcrumbs,
|
breadcrumbs: selectBreadcrumbs,
|
||||||
@@ -17,11 +17,12 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export function BreadCrumbs({ breadcrumbs, bodyshop }) {
|
export function BreadCrumbs({ breadcrumbs, bodyshop }) {
|
||||||
const { OpenSearch } = useTreatments(
|
|
||||||
["OpenSearch"],
|
const { treatments: {OpenSearch} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop && bodyshop.imexshopid
|
names: ["OpenSearch"],
|
||||||
);
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row className="breadcrumb-container">
|
<Row className="breadcrumb-container">
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export function ContractConvertToRo({
|
|||||||
|
|
||||||
const contractLength = dayjs(contract.actualreturn).diff(
|
const contractLength = dayjs(contract.actualreturn).diff(
|
||||||
dayjs(contract.start),
|
dayjs(contract.start),
|
||||||
"days"
|
"day"
|
||||||
);
|
);
|
||||||
const billingLines = [];
|
const billingLines = [];
|
||||||
if (contractLength > 0)
|
if (contractLength > 0)
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export function ContractsList({
|
|||||||
(record.actualreturn &&
|
(record.actualreturn &&
|
||||||
record.start &&
|
record.start &&
|
||||||
`${dayjs(record.actualreturn)
|
`${dayjs(record.actualreturn)
|
||||||
.diff(dayjs(record.start), "days", true)
|
.diff(dayjs(record.start), "day", true)
|
||||||
.toFixed(1)} days`) ||
|
.toFixed(1)} days`) ||
|
||||||
"",
|
"",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import Icon, {
|
|||||||
UnorderedListOutlined,
|
UnorderedListOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import { Layout, Menu } from "antd";
|
import { Layout, Menu } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -87,21 +87,12 @@ function Header({
|
|||||||
recentItems,
|
recentItems,
|
||||||
setCardPaymentContext,
|
setCardPaymentContext,
|
||||||
}) {
|
}) {
|
||||||
const { Simple_Inventory } = useTreatments(
|
// TODO: Client Update - New Split Treatments usage example
|
||||||
["Simple_Inventory"],
|
const { treatments: {ImEXPay, DmsAp, Simple_Inventory} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop && bodyshop.imexshopid
|
names: ["ImEXPay", "DmsAp", "Simple_Inventory"],
|
||||||
);
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
const { DmsAp } = useTreatments(
|
});
|
||||||
["DmsAp"],
|
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
const { ImEXPay } = useTreatments(
|
|
||||||
["ImEXPay"],
|
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export function JobChecklistForm({
|
|||||||
bodyshop.intakechecklist.next_contact_hours > 0 && {
|
bodyshop.intakechecklist.next_contact_hours > 0 && {
|
||||||
date_next_contact: dayjs().add(
|
date_next_contact: dayjs().add(
|
||||||
bodyshop.intakechecklist.next_contact_hours,
|
bodyshop.intakechecklist.next_contact_hours,
|
||||||
"hours"
|
"hour"
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
...(type === "deliver" && {
|
...(type === "deliver" && {
|
||||||
@@ -226,7 +226,7 @@ export function JobChecklistForm({
|
|||||||
(job.labhrs.aggregate.sum.mod_lb_hrs ||
|
(job.labhrs.aggregate.sum.mod_lb_hrs ||
|
||||||
0 + job.larhrs.aggregate.sum.mod_lb_hrs ||
|
0 + job.larhrs.aggregate.sum.mod_lb_hrs ||
|
||||||
0) / bodyshop.target_touchtime,
|
0) / bodyshop.target_touchtime,
|
||||||
"days"
|
"day"
|
||||||
)),
|
)),
|
||||||
scheduled_delivery:
|
scheduled_delivery:
|
||||||
job.scheduled_delivery && dayjs(job.scheduled_delivery),
|
job.scheduled_delivery && dayjs(job.scheduled_delivery),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useApolloClient } from "@apollo/client";
|
import { useApolloClient } from "@apollo/client";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Button, notification, Popconfirm } from "antd";
|
import { Button, notification, Popconfirm } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -27,11 +27,13 @@ export function JobCreateIOU({ bodyshop, currentUser, job, selectedJobLines }) {
|
|||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
const history = useNavigate();
|
const history = useNavigate();
|
||||||
|
|
||||||
const { IOU_Tracking } = useTreatments(
|
|
||||||
["IOU_Tracking"],
|
const { treatments: {IOU_Tracking} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["IOU_Tracking"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
if (IOU_Tracking.treatment !== "on") return null;
|
if (IOU_Tracking.treatment !== "on") return null;
|
||||||
|
|
||||||
const handleCreateIou = async () => {
|
const handleCreateIou = async () => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import InputCurrency from "../form-items-formatted/currency-form-item.component";
|
import InputCurrency from "../form-items-formatted/currency-form-item.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import JoblinesPreset from "../job-lines-preset-button/job-lines-preset-button.component";
|
import JoblinesPreset from "../job-lines-preset-button/job-lines-preset-button.component";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
@@ -35,16 +35,12 @@ export function JobLinesUpsertModalComponent({
|
|||||||
form.resetFields();
|
form.resetFields();
|
||||||
}, [visible, form]);
|
}, [visible, form]);
|
||||||
|
|
||||||
const { Allow_Negative_Jobline_Price } = useTreatments(
|
|
||||||
["Allow_Negative_Jobline_Price"],
|
const { treatments: {Allow_Negative_Jobline_Price, Autohouse_Detail_line} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["Allow_Negative_Jobline_Price", "Autohouse_Detail_line"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
const { Autohouse_Detail_line } = useTreatments(
|
});
|
||||||
["Autohouse_Detail_line"],
|
|
||||||
{},
|
|
||||||
bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import Axios from "axios";
|
|||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
import CriticalPartsScan from "../../utils/criticalPartsScan";
|
import CriticalPartsScan from "../../utils/criticalPartsScan";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
jobLineEditModal: selectJobLineEditModal,
|
jobLineEditModal: selectJobLineEditModal,
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -30,11 +30,13 @@ function JobLinesUpsertModalContainer({
|
|||||||
toggleModalVisible,
|
toggleModalVisible,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
}) {
|
}) {
|
||||||
const { CriticalPartsScanning } = useTreatments(
|
|
||||||
["CriticalPartsScanning"],
|
const { treatments: {CriticalPartsScanning} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ['CriticalPartsScanning'],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [insertJobLine] = useMutation(INSERT_NEW_JOB_LINE);
|
const [insertJobLine] = useMutation(INSERT_NEW_JOB_LINE);
|
||||||
const [updateJobLine] = useMutation(UPDATE_JOB_LINE);
|
const [updateJobLine] = useMutation(UPDATE_JOB_LINE);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import DataLabel from "../data-label/data-label.component";
|
|||||||
import PaymentExpandedRowComponent from "../payment-expanded-row/payment-expanded-row.component";
|
import PaymentExpandedRowComponent from "../payment-expanded-row/payment-expanded-row.component";
|
||||||
import PaymentsGenerateLink from "../payments-generate-link/payments-generate-link.component";
|
import PaymentsGenerateLink from "../payments-generate-link/payments-generate-link.component";
|
||||||
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -36,21 +36,13 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
setMessage: (text) => dispatch(setMessage(text)),
|
setMessage: (text) => dispatch(setMessage(text)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function JobPayments({
|
export function JobPayments({job, jobRO, bodyshop, setMessage, openChatByPhone, setPaymentContext, setCardPaymentContext, refetch}) {
|
||||||
job,
|
|
||||||
jobRO,
|
const { treatments: {ImEXPay} } = useSplitTreatments({
|
||||||
bodyshop,
|
attributes: {},
|
||||||
setMessage,
|
names: ["ImEXPay"],
|
||||||
openChatByPhone,
|
splitKey:bodyshop && bodyshop.imexshopid,
|
||||||
setPaymentContext,
|
});
|
||||||
setCardPaymentContext,
|
|
||||||
refetch,
|
|
||||||
}) {
|
|
||||||
const { ImEXPay } = useTreatments(
|
|
||||||
["ImEXPay"],
|
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
useMutation,
|
useMutation,
|
||||||
useQuery,
|
useQuery,
|
||||||
} from "@apollo/client";
|
} from "@apollo/client";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Col, notification, Row } from "antd";
|
import { Col, notification, Row } from "antd";
|
||||||
import Axios from "axios";
|
import Axios from "axios";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
@@ -50,16 +50,14 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
insertAuditTrail: ({ jobid, operation }) =>
|
insertAuditTrail: ({ jobid, operation }) =>
|
||||||
dispatch(insertAuditTrail({ jobid, operation })),
|
dispatch(insertAuditTrail({ jobid, operation })),
|
||||||
});
|
});
|
||||||
export function JobsAvailableContainer({
|
export function JobsAvailableContainer({bodyshop, currentUser, insertAuditTrail,}) {
|
||||||
bodyshop,
|
|
||||||
currentUser,
|
const { treatments: {CriticalPartsScanning} } = useSplitTreatments({
|
||||||
insertAuditTrail,
|
attributes: {},
|
||||||
}) {
|
names: ["CriticalPartsScanning"],
|
||||||
const { CriticalPartsScanning } = useTreatments(
|
splitKey: bodyshop.imexshopid,
|
||||||
["CriticalPartsScanning"],
|
});
|
||||||
{},
|
|
||||||
bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
const { loading, error, data, refetch } = useQuery(QUERY_AVAILABLE_JOBS, {
|
const { loading, error, data, refetch } = useQuery(QUERY_AVAILABLE_JOBS, {
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
|||||||
import cleanAxios from "../../utils/CleanAxios";
|
import cleanAxios from "../../utils/CleanAxios";
|
||||||
import formatBytes from "../../utils/formatbytes";
|
import formatBytes from "../../utils/formatbytes";
|
||||||
//import yauzl from "yauzl";
|
//import yauzl from "yauzl";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
@@ -22,18 +22,17 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(JobsDocumentsDownloadButton);
|
)(JobsDocumentsDownloadButton);
|
||||||
|
|
||||||
export function JobsDocumentsDownloadButton({
|
export function JobsDocumentsDownloadButton({ bodyshop, galleryImages, identifier}) {
|
||||||
bodyshop,
|
|
||||||
galleryImages,
|
|
||||||
identifier,
|
|
||||||
}) {
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [download, setDownload] = useState(null);
|
const [download, setDownload] = useState(null);
|
||||||
const { Direct_Media_Download } = useTreatments(
|
|
||||||
["Direct_Media_Download"],
|
const { treatments: {Direct_Media_Download} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["Direct_Media_Download"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
const imagesToDownload = [
|
const imagesToDownload = [
|
||||||
...galleryImages.images.filter((image) => image.isSelected),
|
...galleryImages.images.filter((image) => image.isSelected),
|
||||||
...galleryImages.other.filter((image) => image.isSelected),
|
...galleryImages.other.filter((image) => image.isSelected),
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ export default function LoadingSpinner({ loading = true, message, ...props }) {
|
|||||||
alignContent: "center"
|
alignContent: "center"
|
||||||
}}
|
}}
|
||||||
delay={200}
|
delay={200}
|
||||||
tip={message ? message : null}
|
// TODO: Client Update - tip only works when there are actually children, and this component is used in a lot of places where there are no children
|
||||||
|
// tip={message ? message : null}
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</Spin>
|
</Spin>
|
||||||
|
|||||||
@@ -1,18 +1,6 @@
|
|||||||
import { DeleteFilled, WarningFilled, DownOutlined } from "@ant-design/icons";
|
import {DeleteFilled, DownOutlined, WarningFilled} from "@ant-design/icons";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import {
|
import {Checkbox, Divider, Dropdown, Form, Input, InputNumber, Menu, Radio, Select, Space, Tag,} from "antd";
|
||||||
Divider,
|
|
||||||
Form,
|
|
||||||
Input,
|
|
||||||
InputNumber,
|
|
||||||
Radio,
|
|
||||||
Space,
|
|
||||||
Tag,
|
|
||||||
Select,
|
|
||||||
Menu,
|
|
||||||
Dropdown,
|
|
||||||
Checkbox,
|
|
||||||
} from "antd";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
@@ -36,26 +24,16 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(PartsOrderModalComponent);
|
)(PartsOrderModalComponent);
|
||||||
|
|
||||||
export function PartsOrderModalComponent({
|
export function PartsOrderModalComponent({bodyshop, vendorList, sendTypeState, isReturn, preferredMake, job, form,}) {
|
||||||
bodyshop,
|
|
||||||
vendorList,
|
|
||||||
sendTypeState,
|
|
||||||
isReturn,
|
|
||||||
preferredMake,
|
|
||||||
job,
|
|
||||||
form,
|
|
||||||
}) {
|
|
||||||
const [sendType, setSendType] = sendTypeState;
|
const [sendType, setSendType] = sendTypeState;
|
||||||
const { OEConnection } = useTreatments(
|
|
||||||
["OEConnection"],
|
const {treatments: {OEConnection, OEConnection_PriceChange}} = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["OEConnection", "OEConnection_PriceChange"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
const { OEConnection_PriceChange } = useTreatments(
|
});
|
||||||
["OEConnection_PriceChange"],
|
|
||||||
{},
|
|
||||||
bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const handleClick = ({item, key, keyPath}) => {
|
const handleClick = ({item, key, keyPath}) => {
|
||||||
form.setFieldsValue({comments: item.props.value});
|
form.setFieldsValue({comments: item.props.value});
|
||||||
|
|||||||
@@ -1,28 +1,19 @@
|
|||||||
import { useMutation, useQuery, useApolloClient } from "@apollo/client";
|
import {useApolloClient, useMutation, useQuery} from "@apollo/client";
|
||||||
import {Form, Modal, notification} from "antd";
|
import {Form, Modal, notification} from "antd";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import React, {useEffect, useState} from "react";
|
import React, {useEffect, useState} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import { logImEXEvent, auth } from "../../firebase/firebase.utils";
|
import {auth, logImEXEvent} from "../../firebase/firebase.utils";
|
||||||
import {UPDATE_JOB_LINE_STATUS} from "../../graphql/jobs-lines.queries";
|
import {UPDATE_JOB_LINE_STATUS} from "../../graphql/jobs-lines.queries";
|
||||||
import {
|
import {INSERT_NEW_PARTS_ORDERS, QUERY_PARTS_ORDER_OEC,} from "../../graphql/parts-orders.queries";
|
||||||
INSERT_NEW_PARTS_ORDERS,
|
|
||||||
QUERY_PARTS_ORDER_OEC,
|
|
||||||
} from "../../graphql/parts-orders.queries";
|
|
||||||
import {QUERY_ALL_VENDORS_FOR_ORDER} from "../../graphql/vendors.queries";
|
import {QUERY_ALL_VENDORS_FOR_ORDER} from "../../graphql/vendors.queries";
|
||||||
import {insertAuditTrail} from "../../redux/application/application.actions";
|
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||||
import {setEmailOptions} from "../../redux/email/email.actions";
|
import {setEmailOptions} from "../../redux/email/email.actions";
|
||||||
import {
|
import {setModalContext, toggleModalVisible,} from "../../redux/modals/modals.actions";
|
||||||
setModalContext,
|
|
||||||
toggleModalVisible,
|
|
||||||
} from "../../redux/modals/modals.actions";
|
|
||||||
import {selectPartsOrder} from "../../redux/modals/modals.selectors";
|
import {selectPartsOrder} from "../../redux/modals/modals.selectors";
|
||||||
import {
|
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||||
selectBodyshop,
|
|
||||||
selectCurrentUser,
|
|
||||||
} from "../../redux/user/user.selectors";
|
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
import {GenerateDocument} from "../../utils/RenderTemplate";
|
import {GenerateDocument} from "../../utils/RenderTemplate";
|
||||||
import {TemplateList} from "../../utils/TemplateConstants";
|
import {TemplateList} from "../../utils/TemplateConstants";
|
||||||
@@ -30,7 +21,7 @@ import AlertComponent from "../alert/alert.component";
|
|||||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||||
import PartsOrderModalComponent from "./parts-order-modal.component";
|
import PartsOrderModalComponent from "./parts-order-modal.component";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import {UPDATE_JOB} from "../../graphql/jobs.queries";
|
import {UPDATE_JOB} from "../../graphql/jobs.queries";
|
||||||
|
|
||||||
@@ -49,22 +40,16 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
dispatch(insertAuditTrail({jobid, operation})),
|
dispatch(insertAuditTrail({jobid, operation})),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function PartsOrderModalContainer({
|
export function PartsOrderModalContainer({partsOrderModal,toggleModalVisible,currentUser, bodyshop, setEmailOptions, setBillEnterContext, insertAuditTrail,}) {
|
||||||
partsOrderModal,
|
|
||||||
toggleModalVisible,
|
|
||||||
currentUser,
|
|
||||||
bodyshop,
|
|
||||||
setEmailOptions,
|
|
||||||
setBillEnterContext,
|
|
||||||
insertAuditTrail,
|
|
||||||
}) {
|
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
const { OEConnection_PriceChange } = useTreatments(
|
|
||||||
["OEConnection_PriceChange"],
|
const {treatments: {OEConnection_PriceChange}} = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["OEConnection_PriceChange"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
const {visible, context, actions} = partsOrderModal;
|
const {visible, context, actions} = partsOrderModal;
|
||||||
const {
|
const {
|
||||||
jobId,
|
jobId,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import {Form, Input, Radio, Select} from "antd";
|
import {Form, Input, Radio, Select} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
@@ -15,16 +15,14 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function PaymentFormComponent({
|
export function PaymentFormComponent({form, bodyshop, disabled,}) {
|
||||||
form,
|
|
||||||
bodyshop,
|
const {treatments: {Qb_Multi_Ar}} = useSplitTreatments({
|
||||||
disabled,
|
attributes: {},
|
||||||
}) {
|
names: ["Qb_Multi_Ar"],
|
||||||
const { Qb_Multi_Ar } = useTreatments(
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
["Qb_Multi_Ar"],
|
});
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
|
|
||||||
@@ -158,4 +156,5 @@ export function PaymentFormComponent({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps, null)(PaymentFormComponent);
|
export default connect(mapStateToProps, null)(PaymentFormComponent);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export function ProductionlistColumnTouchTime({ bodyshop, job }) {
|
|||||||
|
|
||||||
const Difference_In_Days = dayjs().diff(
|
const Difference_In_Days = dayjs().diff(
|
||||||
dayjs(job.actual_in),
|
dayjs(job.actual_in),
|
||||||
"days",
|
"day",
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
import {SyncOutlined} from "@ant-design/icons";
|
import {SyncOutlined} from "@ant-design/icons";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import {
|
import {Button, Dropdown, Input, Menu, Space, Statistic, Table,} from "antd";
|
||||||
Button,
|
|
||||||
Dropdown,
|
|
||||||
Input,
|
|
||||||
Menu,
|
|
||||||
Space,
|
|
||||||
Statistic,
|
|
||||||
Table,
|
|
||||||
} from "antd";
|
|
||||||
import {PageHeader} from "@ant-design/pro-layout";
|
import {PageHeader} from "@ant-design/pro-layout";
|
||||||
import React, {useMemo, useState} from "react";
|
import React, {useMemo, useState} from "react";
|
||||||
import ReactDragListView from "react-drag-listview";
|
import ReactDragListView from "react-drag-listview";
|
||||||
@@ -16,14 +8,12 @@ import { useTranslation } from "react-i18next";
|
|||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {selectTechnician} from "../../redux/tech/tech.selectors";
|
import {selectTechnician} from "../../redux/tech/tech.selectors";
|
||||||
import {
|
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||||
selectBodyshop,
|
|
||||||
selectCurrentUser,
|
|
||||||
} from "../../redux/user/user.selectors";
|
|
||||||
import ProductionListColumnsAdd from "../production-list-columns/production-list-columns.add.component";
|
import ProductionListColumnsAdd from "../production-list-columns/production-list-columns.add.component";
|
||||||
import ProductionListColumns from "../production-list-columns/production-list-columns.data";
|
import ProductionListColumns from "../production-list-columns/production-list-columns.data";
|
||||||
import ProductionListDetail from "../production-list-detail/production-list-detail.component";
|
import ProductionListDetail from "../production-list-detail/production-list-detail.component";
|
||||||
import ProductionListSaveConfigButton from "../production-list-save-config-button/production-list-save-config-button.component";
|
import ProductionListSaveConfigButton
|
||||||
|
from "../production-list-save-config-button/production-list-save-config-button.component";
|
||||||
import ProductionListPrint from "./production-list-print.component";
|
import ProductionListPrint from "./production-list-print.component";
|
||||||
import ProductionListTableViewSelect from "./production-list-table-view-select.component";
|
import ProductionListTableViewSelect from "./production-list-table-view-select.component";
|
||||||
import ResizeableTitle from "./production-list-table.resizeable.component";
|
import ResizeableTitle from "./production-list-table.resizeable.component";
|
||||||
@@ -34,20 +24,17 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function ProductionListTable({
|
export function ProductionListTable({loading, data, refetch, bodyshop, technician, currentUser}) {
|
||||||
loading,
|
|
||||||
data,
|
|
||||||
refetch,
|
|
||||||
bodyshop,
|
|
||||||
technician,
|
|
||||||
currentUser,
|
|
||||||
}) {
|
|
||||||
const [searchText, setSearchText] = useState("");
|
const [searchText, setSearchText] = useState("");
|
||||||
const { Production_List_Status_Colors } = useTreatments(
|
|
||||||
["Production_List_Status_Colors"],
|
const { treatments: {Production_List_Status_Colors} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["Production_List_Status_Colors"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
const assoc = bodyshop.associations.find(
|
const assoc = bodyshop.associations.find(
|
||||||
(a) => a.useremail === currentUser.email
|
(a) => a.useremail === currentUser.email
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
|
|||||||
>
|
>
|
||||||
<DatePicker.RangePicker
|
<DatePicker.RangePicker
|
||||||
format="MM/DD/YYYY"
|
format="MM/DD/YYYY"
|
||||||
ranges={DatePIckerRanges}
|
presets={DatePIckerRanges}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item style={{ margin: 0, padding: 0 }} dependencies={["key"]}>
|
<Form.Item style={{ margin: 0, padding: 0 }} dependencies={["key"]}>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export function ScheduleJobModalComponent({
|
|||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
scheduled_completion: dayjs(values.start).businessAdd(
|
scheduled_completion: dayjs(values.start).businessAdd(
|
||||||
totalHours / bodyshop.target_touchtime,
|
totalHours / bodyshop.target_touchtime,
|
||||||
"days"
|
"day"
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ export function ScheduleJobModalComponent({
|
|||||||
if (ssDate.isBefore(dayjs())) {
|
if (ssDate.isBefore(dayjs())) {
|
||||||
form.setFieldsValue({ start: dayjs() });
|
form.setFieldsValue({ start: dayjs() });
|
||||||
} else {
|
} else {
|
||||||
form.setFieldsValue({ start: dayjs(d).add(8, "hours") });
|
form.setFieldsValue({ start: dayjs(d).add(8, "hour") });
|
||||||
}
|
}
|
||||||
handleDateBlur();
|
handleDateBlur();
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ export const ListOfDaysInCurrentMonth = () => {
|
|||||||
const days = [];
|
const days = [];
|
||||||
const dateStart = dayjs().startOf("month");
|
const dateStart = dayjs().startOf("month");
|
||||||
const dateEnd = dayjs().endOf("month");
|
const dateEnd = dayjs().endOf("month");
|
||||||
while (dateEnd.diff(dateStart, "days") > 0) {
|
while (dateEnd.diff(dateStart, "day") > 0) {
|
||||||
days.push(dateStart.format("YYYY-MM-DD"));
|
days.push(dateStart.format("YYYY-MM-DD"));
|
||||||
dateStart.add(1, "days");
|
dateStart.add(1, "day");
|
||||||
}
|
}
|
||||||
days.push(dateEnd.format("YYYY-MM-DD"));
|
days.push(dateEnd.format("YYYY-MM-DD"));
|
||||||
return days;
|
return days;
|
||||||
@@ -73,9 +73,9 @@ export const ListDaysBetween = ({ start, end }) => {
|
|||||||
const days = [];
|
const days = [];
|
||||||
const dateStart = dayjs(start);
|
const dateStart = dayjs(start);
|
||||||
const dateEnd = dayjs(end);
|
const dateEnd = dayjs(end);
|
||||||
while (dateEnd.diff(dateStart, "days") > 0) {
|
while (dateEnd.diff(dateStart, "day") > 0) {
|
||||||
days.push(dateStart.format("YYYY-MM-DD"));
|
days.push(dateStart.format("YYYY-MM-DD"));
|
||||||
dateStart.add(1, "days");
|
dateStart.add(1, "day");
|
||||||
}
|
}
|
||||||
days.push(dateEnd.format("YYYY-MM-DD"));
|
days.push(dateEnd.format("YYYY-MM-DD"));
|
||||||
return days;
|
return days;
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
|
|||||||
dataIndex: "length",
|
dataIndex: "length",
|
||||||
key: "length",
|
key: "length",
|
||||||
render: (text, record) =>
|
render: (text, record) =>
|
||||||
dayjs(record.end).diff(dayjs(record.start), "days", true).toFixed(1),
|
dayjs(record.end).diff(dayjs(record.start), "day", true).toFixed(1),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("general.labels.actions"),
|
title: t("general.labels.actions"),
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import {Button, Card, Tabs} from "antd";
|
import {Button, Card, Tabs} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
@@ -15,7 +15,7 @@ import ShopInfoResponsibilityCenterComponent from "./shop-info.responsibilitycen
|
|||||||
import ShopInfoROStatusComponent from "./shop-info.rostatus.component";
|
import ShopInfoROStatusComponent from "./shop-info.rostatus.component";
|
||||||
import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
|
import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
|
||||||
import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
|
import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
|
||||||
import { useNavigate, useLocation } from "react-router-dom";
|
import {useLocation, useNavigate} from "react-router-dom";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -27,11 +27,13 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoComponent);
|
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoComponent);
|
||||||
|
|
||||||
export function ShopInfoComponent({bodyshop, form, saveLoading}) {
|
export function ShopInfoComponent({bodyshop, form, saveLoading}) {
|
||||||
const { CriticalPartsScanning } = useTreatments(
|
|
||||||
["CriticalPartsScanning"],
|
const { treatments: {CriticalPartsScanning} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["CriticalPartsScanning"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const history = useNavigate();
|
const history = useNavigate();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { DeleteFilled } from "@ant-design/icons";
|
import { DeleteFilled } from "@ant-design/icons";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
DatePicker,
|
DatePicker,
|
||||||
@@ -35,13 +35,14 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoGeneral);
|
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoGeneral);
|
||||||
|
|
||||||
export function ShopInfoGeneral({ form, bodyshop }) {
|
export function ShopInfoGeneral({ form, bodyshop }) {
|
||||||
const { t } = useTranslation();
|
|
||||||
const { ClosingPeriod } = useTreatments(
|
|
||||||
["ClosingPeriod"],
|
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const { treatments: {ClosingPeriod} } = useSplitTreatments({
|
||||||
|
attributes: {},
|
||||||
|
names: ["ClosingPeriod"],
|
||||||
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -413,13 +414,12 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
{ClosingPeriod.treatment === "on" && (
|
{ClosingPeriod.treatment === "on" && (
|
||||||
<>
|
<>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
allowClear
|
|
||||||
name={["accountingconfig", "ClosingPeriod"]}
|
name={["accountingconfig", "ClosingPeriod"]}
|
||||||
label={t("bodyshop.fields.closingperiod")} //{t("reportcenter.labels.dates")}
|
label={t("bodyshop.fields.closingperiod")} //{t("reportcenter.labels.dates")}
|
||||||
>
|
>
|
||||||
<DatePicker.RangePicker
|
<DatePicker.RangePicker
|
||||||
format="MM/DD/YYYY"
|
format="MM/DD/YYYY"
|
||||||
ranges={DatePickerRanges}
|
presets={DatePickerRanges}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
|||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -19,11 +20,13 @@ export default connect(
|
|||||||
|
|
||||||
export function ShopInfoOrderStatusComponent({bodyshop, form}) {
|
export function ShopInfoOrderStatusComponent({bodyshop, form}) {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const { OEConnection } = useTreatments(
|
|
||||||
["OEConnection"],
|
const {treatments: {OEConnection}} = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["OEConnection"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LayoutFormRow header={t("bodyshop.labels.orderstatuses")}>
|
<LayoutFormRow header={t("bodyshop.labels.orderstatuses")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
|
||||||
import {Form, InputNumber} from "antd";
|
import {Form, InputNumber} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
@@ -7,6 +6,8 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -20,11 +21,14 @@ export default connect(
|
|||||||
|
|
||||||
export function ShopInfoRbacComponent({form, bodyshop}) {
|
export function ShopInfoRbacComponent({form, bodyshop}) {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const { Simple_Inventory } = useTreatments(
|
|
||||||
["Simple_Inventory"],
|
|
||||||
{},
|
const { treatments: {Simple_Inventory} } = useSplitTreatments({
|
||||||
bodyshop && bodyshop.imexshopid
|
attributes: {},
|
||||||
);
|
names: ["Simple_Inventory"],
|
||||||
|
splitKey:bodyshop && bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RbacWrapper action="shop:rbac">
|
<RbacWrapper action="shop:rbac">
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
import {DeleteFilled} from "@ant-design/icons";
|
import {DeleteFilled} from "@ant-design/icons";
|
||||||
import {
|
import {Button, Form, Input, InputNumber, Select, Switch, Typography,} from "antd";
|
||||||
Button,
|
|
||||||
Form,
|
|
||||||
Input,
|
|
||||||
InputNumber,
|
|
||||||
Select,
|
|
||||||
Switch,
|
|
||||||
Typography,
|
|
||||||
} from "antd";
|
|
||||||
import React, {useState} from "react";
|
import React, {useState} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
@@ -16,7 +8,7 @@ import DataLabel from "../data-label/data-label.component";
|
|||||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
const SelectorDiv = styled.div`
|
const SelectorDiv = styled.div`
|
||||||
.ant-form-item .ant-select {
|
.ant-form-item .ant-select {
|
||||||
@@ -38,16 +30,13 @@ export default connect(
|
|||||||
|
|
||||||
export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
|
export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const { Qb_Multi_Ar } = useTreatments(
|
|
||||||
["Qb_Multi_Ar"],
|
const { treatments: {Qb_Multi_Ar,DmsAp} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop && bodyshop.imexshopid
|
names: ["Qb_Multi_Ar","DmsAp"],
|
||||||
);
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
const { DmsAp } = useTreatments(
|
});
|
||||||
["DmsAp"],
|
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
const [costOptions, setCostOptions] = useState(
|
const [costOptions, setCostOptions] = useState(
|
||||||
[
|
[
|
||||||
...((form.getFieldValue(["md_responsibility_centers", "costs"]) &&
|
...((form.getFieldValue(["md_responsibility_centers", "costs"]) &&
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {DeleteFilled} from "@ant-design/icons";
|
import {DeleteFilled} from "@ant-design/icons";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
|
||||||
import {Button, Form, Select, Space} from "antd";
|
import {Button, Form, Select, Space} from "antd";
|
||||||
import React, {useState} from "react";
|
import React, {useState} from "react";
|
||||||
import {ChromePicker} from "react-color";
|
import {ChromePicker} from "react-color";
|
||||||
@@ -10,6 +9,8 @@ import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
|||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -27,13 +28,16 @@ const SelectorDiv = styled.div`
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export function ShopInfoROStatusComponent({bodyshop, form}) {
|
export function ShopInfoROStatusComponent({bodyshop, form}) {
|
||||||
|
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const { Production_List_Status_Colors } = useTreatments(
|
|
||||||
["Production_List_Status_Colors"],
|
const { treatments: {Production_List_Status_Colors} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop.imexshopid
|
names: ["Production_List_Status_Colors"],
|
||||||
);
|
splitKey: bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
const [options, setOptions] = useState(
|
const [options, setOptions] = useState(
|
||||||
form.getFieldValue(["md_ro_statuses", "statuses"]) || []
|
form.getFieldValue(["md_ro_statuses", "statuses"]) || []
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export function TechJobPrintTickets({ technician, event, attendacePrint }) {
|
|||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<DatePicker.RangePicker
|
<DatePicker.RangePicker
|
||||||
ranges={DatePIckerRanges}
|
presets={DatePIckerRanges}
|
||||||
format={"MM/DD/YYYY"}
|
format={"MM/DD/YYYY"}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export default function TimeTicketsDatesSelector() {
|
|||||||
end ? dayjs(end) : dayjs().endOf("week"),
|
end ? dayjs(end) : dayjs().endOf("week"),
|
||||||
]}
|
]}
|
||||||
format="MM/DD/YYYY"
|
format="MM/DD/YYYY"
|
||||||
ranges={DatePickerRanges}
|
presets={DatePickerRanges}
|
||||||
onCalendarChange={handleChange}
|
onCalendarChange={handleChange}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export function TimeTicketList({
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{dayjs(record.clockoff)
|
{dayjs(record.clockoff)
|
||||||
.diff(dayjs(record.clockon), "hours", true)
|
.diff(dayjs(record.clockon), "hour", true)
|
||||||
.toFixed(2)}
|
.toFixed(2)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ const JobRelatedTicketsTable = ({
|
|||||||
if (!!val.clockoff && !!val.clockon)
|
if (!!val.clockoff && !!val.clockon)
|
||||||
return (
|
return (
|
||||||
acc +
|
acc +
|
||||||
dayjs(val.clockoff).diff(dayjs(val.clockon), "hours", true)
|
dayjs(val.clockoff).diff(dayjs(val.clockon), "hour", true)
|
||||||
);
|
);
|
||||||
return acc;
|
return acc;
|
||||||
}, 0);
|
}, 0);
|
||||||
@@ -251,7 +251,7 @@ const ShiftRelatedTicketsTable = ({
|
|||||||
const clockHrs = item.tickets.reduce((acc, val) => {
|
const clockHrs = item.tickets.reduce((acc, val) => {
|
||||||
if (!!val.clockoff && !!val.clockon)
|
if (!!val.clockoff && !!val.clockon)
|
||||||
return (
|
return (
|
||||||
acc + dayjs(val.clockoff).diff(dayjs(val.clockon), "hours", true)
|
acc + dayjs(val.clockoff).diff(dayjs(val.clockon), "hour", true)
|
||||||
);
|
);
|
||||||
return acc;
|
return acc;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|||||||
@@ -1,30 +1,21 @@
|
|||||||
import {DeleteFilled} from "@ant-design/icons";
|
import {DeleteFilled} from "@ant-design/icons";
|
||||||
import {useApolloClient} from "@apollo/client";
|
import {useApolloClient} from "@apollo/client";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
import {
|
import {Button, Divider, Form, Input, InputNumber, Space, Switch,} from "antd";
|
||||||
Button,
|
|
||||||
Divider,
|
|
||||||
Form,
|
|
||||||
Input,
|
|
||||||
InputNumber,
|
|
||||||
Space,
|
|
||||||
Switch,
|
|
||||||
} from "antd";
|
|
||||||
import {PageHeader} from "@ant-design/pro-layout";
|
import {PageHeader} from "@ant-design/pro-layout";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {CHECK_VENDOR_NAME} from "../../graphql/vendors.queries";
|
import {CHECK_VENDOR_NAME} from "../../graphql/vendors.queries";
|
||||||
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
||||||
import PhoneFormItem, {
|
import PhoneFormItem, {PhoneItemFormatterValidation,} from "../form-items-formatted/phone-form-item.component";
|
||||||
PhoneItemFormatterValidation,
|
|
||||||
} from "../form-items-formatted/phone-form-item.component";
|
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import VendorsPhonebookAdd from "../vendors-phonebook-add/vendors-phonebook-add.component";
|
import VendorsPhonebookAdd from "../vendors-phonebook-add/vendors-phonebook-add.component";
|
||||||
|
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -36,21 +27,17 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(VendorsFormComponent);
|
)(VendorsFormComponent);
|
||||||
|
|
||||||
export function VendorsFormComponent({
|
export function VendorsFormComponent({bodyshop, form, formLoading, handleDelete, responsibilityCenters, selectedvendor}) {
|
||||||
bodyshop,
|
|
||||||
form,
|
|
||||||
formLoading,
|
|
||||||
handleDelete,
|
|
||||||
responsibilityCenters,
|
|
||||||
selectedvendor,
|
|
||||||
}) {
|
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
const { DmsAp } = useTreatments(
|
|
||||||
["DmsAp"],
|
|
||||||
{},
|
const {treatments: {DmsAp}} = useSplitTreatments({
|
||||||
bodyshop && bodyshop.imexshopid
|
attributes: {},
|
||||||
);
|
names: ["DmsAp"],
|
||||||
|
splitKey: bodyshop && bodyshop.imexshopid
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
const {getFieldValue} = form;
|
const {getFieldValue} = form;
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import React, { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
// import { useNavigate } from 'react-router-dom';
|
// import { useNavigate } from 'react-router-dom';
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
@@ -51,16 +51,12 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
|||||||
// const history = useHistory();
|
// const history = useHistory();
|
||||||
const [closeJob] = useMutation(UPDATE_JOB);
|
const [closeJob] = useMutation(UPDATE_JOB);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const { Qb_Multi_Ar } = useTreatments(
|
|
||||||
["Qb_Multi_Ar"],
|
const { treatments: {Qb_Multi_Ar,ClosingPeriod} } = useSplitTreatments({
|
||||||
{},
|
attributes: {},
|
||||||
bodyshop && bodyshop.imexshopid
|
names: ["Qb_Multi_Ar", "ClosingPeriod"],
|
||||||
);
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
const { ClosingPeriod } = useTreatments(
|
});
|
||||||
["ClosingPeriod"],
|
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleFinish = async ({ removefromproduction, ...values }) => {
|
const handleFinish = async ({ removefromproduction, ...values }) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {BackTop, Layout} from "antd";
|
import {FloatButton, Layout} from "antd";
|
||||||
import preval from "preval.macro";
|
import preval from "preval.macro";
|
||||||
import React, {lazy, Suspense, useEffect} from "react";
|
import React, {lazy, Suspense, useEffect} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
@@ -371,7 +371,7 @@ export function Manage({conflict, bodyshop}) {
|
|||||||
{PageContent}
|
{PageContent}
|
||||||
</Sentry.ErrorBoundary>
|
</Sentry.ErrorBoundary>
|
||||||
|
|
||||||
<BackTop/>
|
<FloatButton.BackTop/>
|
||||||
<Footer>
|
<Footer>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BackTop, Layout } from "antd";
|
import {FloatButton, Layout} from "antd";
|
||||||
import React, { Suspense, lazy, useEffect } from "react";
|
import React, { Suspense, lazy, useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -90,7 +90,7 @@ export function TechPage({ technician }) {
|
|||||||
</FeatureWrapper>
|
</FeatureWrapper>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
<BackTop />
|
<FloatButton.BackTop />
|
||||||
</Content>
|
</Content>
|
||||||
</Layout>
|
</Layout>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@@ -1,27 +1,62 @@
|
|||||||
import dayjs from "./day";
|
import dayjs from "./day";
|
||||||
const range = {
|
|
||||||
Today: [dayjs(), dayjs()],
|
const range = [
|
||||||
"Last 14 days": [dayjs().subtract(14, "day"), dayjs()],
|
{
|
||||||
"Last 7 days": [dayjs().subtract(7, "day"), dayjs()],
|
label: 'Today',
|
||||||
"Next 7 days": [dayjs(), dayjs().add(7, "day")],
|
value: [dayjs(), dayjs()]
|
||||||
"Next 14 days": [dayjs(), dayjs().add(14, "day")],
|
},
|
||||||
"Last Month": [
|
{
|
||||||
|
label: 'Last 14 days',
|
||||||
|
value: [dayjs().subtract(14, "day"), dayjs()]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Last 7 days',
|
||||||
|
value: [dayjs().subtract(7, "day"), dayjs()]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Next 7 days',
|
||||||
|
value: [dayjs(), dayjs().add(7, "day")]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Next 14 days',
|
||||||
|
value: [dayjs(), dayjs().add(14, "day")],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Last Month',
|
||||||
|
value: [
|
||||||
dayjs().startOf("month").subtract(1, "month"),
|
dayjs().startOf("month").subtract(1, "month"),
|
||||||
dayjs().startOf("month").subtract(1, "month").endOf("month"),
|
dayjs().startOf("month").subtract(1, "month").endOf("month"),
|
||||||
],
|
]
|
||||||
"This Month": [dayjs().startOf("month"), dayjs().endOf("month")],
|
},
|
||||||
"Next Month": [
|
{
|
||||||
|
label: 'This Month',
|
||||||
|
value: [dayjs().startOf("month"), dayjs().endOf("month")]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Next Month',
|
||||||
|
value: [
|
||||||
dayjs().startOf("month").add(1, "month"),
|
dayjs().startOf("month").add(1, "month"),
|
||||||
dayjs().startOf("month").add(1, "month").endOf("month"),
|
dayjs().startOf("month").add(1, "month").endOf("month"),
|
||||||
],
|
]
|
||||||
"Last Quarter": [
|
},
|
||||||
|
{
|
||||||
|
label: 'Last Quarter',
|
||||||
|
value: [
|
||||||
dayjs().startOf("quarter").subtract(1, "quarter"),
|
dayjs().startOf("quarter").subtract(1, "quarter"),
|
||||||
dayjs().startOf("quarter").subtract(1, "day"),
|
dayjs().startOf("quarter").subtract(1, "day"),
|
||||||
],
|
]
|
||||||
"This Quarter": [
|
},
|
||||||
|
{
|
||||||
|
label: 'This Quarter',
|
||||||
|
value: [
|
||||||
dayjs().startOf("quarter"),
|
dayjs().startOf("quarter"),
|
||||||
dayjs().startOf("quarter").add(1, "quarter").subtract(1, "day"),
|
dayjs().startOf("quarter").add(1, "quarter").subtract(1, "day"),
|
||||||
],
|
]
|
||||||
"Last 90 Days": [dayjs().add(-90, "day"), dayjs()],
|
},
|
||||||
};
|
{
|
||||||
|
label: 'Last 90 Days',
|
||||||
|
value: [dayjs().add(-90, "day"), dayjs()],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
export default range;
|
export default range;
|
||||||
|
|||||||
@@ -54,27 +54,27 @@ function functionMapper(f, timezone) {
|
|||||||
case "date.yesterday":
|
case "date.yesterday":
|
||||||
return moment().tz(timezone).subtract(1, "day").format(isoFormat);
|
return moment().tz(timezone).subtract(1, "day").format(isoFormat);
|
||||||
case "date.3daysago":
|
case "date.3daysago":
|
||||||
return moment().tz(timezone).subtract(3, "days").format(isoFormat);
|
return moment().tz(timezone).subtract(3, "day").format(isoFormat);
|
||||||
case "date.7daysago":
|
case "date.7daysago":
|
||||||
return moment().tz(timezone).subtract(7, "days").format(isoFormat);
|
return moment().tz(timezone).subtract(7, "day").format(isoFormat);
|
||||||
case "date.tomorrow":
|
case "date.tomorrow":
|
||||||
return moment().tz(timezone).add(1, "day").format(isoFormat);
|
return moment().tz(timezone).add(1, "day").format(isoFormat);
|
||||||
case "date.3daysfromnow":
|
case "date.3daysfromnow":
|
||||||
return moment().tz(timezone).add(3, "days").format(isoFormat);
|
return moment().tz(timezone).add(3, "day").format(isoFormat);
|
||||||
case "date.7daysfromnow":
|
case "date.7daysfromnow":
|
||||||
return moment().tz(timezone).add(7, "days").format(isoFormat);
|
return moment().tz(timezone).add(7, "day").format(isoFormat);
|
||||||
case "date.yesterdaytz":
|
case "date.yesterdaytz":
|
||||||
return moment().tz(timezone).subtract(1, "day");
|
return moment().tz(timezone).subtract(1, "day");
|
||||||
case "date.3daysagotz":
|
case "date.3daysagotz":
|
||||||
return moment().tz(timezone).subtract(3, "days");
|
return moment().tz(timezone).subtract(3, "day");
|
||||||
case "date.7daysagotz":
|
case "date.7daysagotz":
|
||||||
return moment().tz(timezone).subtract(7, "days");
|
return moment().tz(timezone).subtract(7, "day");
|
||||||
case "date.tomorrowtz":
|
case "date.tomorrowtz":
|
||||||
return moment().tz(timezone).add(1, "day");
|
return moment().tz(timezone).add(1, "day");
|
||||||
case "date.3daysfromnowtz":
|
case "date.3daysfromnowtz":
|
||||||
return moment().tz(timezone).add(3, "days");
|
return moment().tz(timezone).add(3, "day");
|
||||||
case "date.7daysfromnowtz":
|
case "date.7daysfromnowtz":
|
||||||
return moment().tz(timezone).add(7, "days");
|
return moment().tz(timezone).add(7, "day");
|
||||||
|
|
||||||
case "date.now":
|
case "date.now":
|
||||||
return moment().tz(timezone);
|
return moment().tz(timezone);
|
||||||
|
|||||||
Reference in New Issue
Block a user