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