@@ -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,23 +1,11 @@
|
|||||||
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";
|
||||||
import { createStructuredSelector } from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
||||||
@@ -36,29 +24,19 @@ 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 handleClick = ({item, key, keyPath}) => {
|
||||||
const { t } = useTranslation();
|
form.setFieldsValue({comments: item.props.value});
|
||||||
const handleClick = ({ item, key, keyPath }) => {
|
|
||||||
form.setFieldsValue({ comments: item.props.value });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const menu = (
|
const menu = (
|
||||||
@@ -75,8 +53,8 @@ export function PartsOrderModalComponent({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Form.Item name="returnfrombill" style={{ display: "none" }}>
|
<Form.Item name="returnfrombill" style={{display: "none"}}>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<LayoutFormRow grow noDivider>
|
<LayoutFormRow grow noDivider>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -106,12 +84,12 @@ export function PartsOrderModalComponent({
|
|||||||
]}
|
]}
|
||||||
label={t("parts_orders.fields.deliver_by")}
|
label={t("parts_orders.fields.deliver_by")}
|
||||||
>
|
>
|
||||||
<FormDatePicker onlyFuture />
|
<FormDatePicker onlyFuture/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{job && job.special_coverage_policy && (
|
{job && job.special_coverage_policy && (
|
||||||
<Tag color="tomato">
|
<Tag color="tomato">
|
||||||
<Space>
|
<Space>
|
||||||
<WarningFilled />
|
<WarningFilled/>
|
||||||
<span>{t("jobs.labels.specialcoveragepolicy")}</span>
|
<span>{t("jobs.labels.specialcoveragepolicy")}</span>
|
||||||
</Space>
|
</Space>
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -122,7 +100,7 @@ export function PartsOrderModalComponent({
|
|||||||
label={t("parts_orders.labels.removefrompartsqueue")}
|
label={t("parts_orders.labels.removefrompartsqueue")}
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
>
|
>
|
||||||
<Checkbox />
|
<Checkbox/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
{OEConnection.treatment === "on" && !isReturn && (
|
{OEConnection.treatment === "on" && !isReturn && (
|
||||||
@@ -131,7 +109,7 @@ export function PartsOrderModalComponent({
|
|||||||
label={t("parts_orders.labels.is_quote")}
|
label={t("parts_orders.labels.is_quote")}
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
>
|
>
|
||||||
<Checkbox />
|
<Checkbox/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -154,13 +132,13 @@ export function PartsOrderModalComponent({
|
|||||||
{t("parts_orders.labels.inthisorder")}
|
{t("parts_orders.labels.inthisorder")}
|
||||||
</Divider>
|
</Divider>
|
||||||
<Form.List name={["parts_order_lines", "data"]}>
|
<Form.List name={["parts_order_lines", "data"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, {add, remove, move}) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<Form.Item required={false} key={field.key}>
|
<Form.Item required={false} key={field.key}>
|
||||||
<div style={{ display: "flex" }}>
|
<div style={{display: "flex"}}>
|
||||||
<LayoutFormRow grow noDivider style={{ flex: 1 }}>
|
<LayoutFormRow grow noDivider style={{flex: 1}}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
//span={8}
|
//span={8}
|
||||||
label={t("parts_orders.fields.line_desc")}
|
label={t("parts_orders.fields.line_desc")}
|
||||||
@@ -173,14 +151,14 @@ export function PartsOrderModalComponent({
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("parts_orders.fields.line_remarks")}
|
label={t("parts_orders.fields.line_remarks")}
|
||||||
key={`${index}line_remarks`}
|
key={`${index}line_remarks`}
|
||||||
name={[field.name, "line_remarks"]}
|
name={[field.name, "line_remarks"]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("parts_orders.fields.part_type")}
|
label={t("parts_orders.fields.part_type")}
|
||||||
@@ -233,7 +211,7 @@ export function PartsOrderModalComponent({
|
|||||||
key={`${index}oem_partno`}
|
key={`${index}oem_partno`}
|
||||||
name={[field.name, "oem_partno"]}
|
name={[field.name, "oem_partno"]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{
|
{
|
||||||
// <Form.Item
|
// <Form.Item
|
||||||
@@ -255,7 +233,7 @@ export function PartsOrderModalComponent({
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("parts_orders.fields.act_price")}
|
label={t("parts_orders.fields.act_price")}
|
||||||
@@ -277,14 +255,14 @@ export function PartsOrderModalComponent({
|
|||||||
key={`${index}cost`}
|
key={`${index}cost`}
|
||||||
name={[field.name, "cost"]}
|
name={[field.name, "cost"]}
|
||||||
>
|
>
|
||||||
<CurrencyInput />
|
<CurrencyInput/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<Space wrap size="small" align="center">
|
<Space wrap size="small" align="center">
|
||||||
<div>
|
<div>
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
style={{ margin: "1rem" }}
|
style={{margin: "1rem"}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
remove(field.name);
|
remove(field.name);
|
||||||
}}
|
}}
|
||||||
@@ -314,13 +292,13 @@ export function PartsOrderModalComponent({
|
|||||||
href=" #"
|
href=" #"
|
||||||
onClick={(e) => e.preventDefault()}
|
onClick={(e) => e.preventDefault()}
|
||||||
>
|
>
|
||||||
<DownOutlined />
|
<DownOutlined/>
|
||||||
</a>
|
</a>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Input.TextArea rows={3} />
|
<Input.TextArea rows={3}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item noStyle shouldUpdate>
|
<Form.Item noStyle shouldUpdate>
|
||||||
|
|||||||
@@ -1,38 +1,29 @@
|
|||||||
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,
|
import {QUERY_ALL_VENDORS_FOR_ORDER} from "../../graphql/vendors.queries";
|
||||||
QUERY_PARTS_ORDER_OEC,
|
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||||
} from "../../graphql/parts-orders.queries";
|
import {setEmailOptions} from "../../redux/email/email.actions";
|
||||||
import { QUERY_ALL_VENDORS_FOR_ORDER } from "../../graphql/vendors.queries";
|
import {setModalContext, toggleModalVisible,} from "../../redux/modals/modals.actions";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import {selectPartsOrder} from "../../redux/modals/modals.selectors";
|
||||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||||
import {
|
|
||||||
setModalContext,
|
|
||||||
toggleModalVisible,
|
|
||||||
} from "../../redux/modals/modals.actions";
|
|
||||||
import { selectPartsOrder } from "../../redux/modals/modals.selectors";
|
|
||||||
import {
|
|
||||||
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";
|
||||||
import AlertComponent from "../alert/alert.component";
|
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";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
@@ -44,28 +35,22 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
||||||
toggleModalVisible: () => dispatch(toggleModalVisible("partsOrder")),
|
toggleModalVisible: () => dispatch(toggleModalVisible("partsOrder")),
|
||||||
setBillEnterContext: (context) =>
|
setBillEnterContext: (context) =>
|
||||||
dispatch(setModalContext({ context: context, modal: "billEnter" })),
|
dispatch(setModalContext({context: context, modal: "billEnter"})),
|
||||||
insertAuditTrail: ({ jobid, operation }) =>
|
insertAuditTrail: ({jobid, operation}) =>
|
||||||
dispatch(insertAuditTrail({ jobid, operation })),
|
dispatch(insertAuditTrail({jobid, operation})),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function PartsOrderModalContainer({
|
export function PartsOrderModalContainer({partsOrderModal,toggleModalVisible,currentUser, bodyshop, setEmailOptions, setBillEnterContext, insertAuditTrail,}) {
|
||||||
partsOrderModal,
|
const {t} = useTranslation();
|
||||||
toggleModalVisible,
|
|
||||||
currentUser,
|
|
||||||
bodyshop,
|
|
||||||
setEmailOptions,
|
|
||||||
setBillEnterContext,
|
|
||||||
insertAuditTrail,
|
|
||||||
}) {
|
|
||||||
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,
|
||||||
linesToOrder,
|
linesToOrder,
|
||||||
@@ -76,15 +61,15 @@ export function PartsOrderModalContainer({
|
|||||||
job,
|
job,
|
||||||
} = context;
|
} = context;
|
||||||
|
|
||||||
const { refetch } = actions;
|
const {refetch} = actions;
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [saving, setSaving] = useState(false);
|
const [saving, setSaving] = useState(false);
|
||||||
const sendTypeState = useState("e");
|
const sendTypeState = useState("e");
|
||||||
const sendType = sendTypeState[0];
|
const sendType = sendTypeState[0];
|
||||||
|
|
||||||
const { loading, error, data } = useQuery(QUERY_ALL_VENDORS_FOR_ORDER, {
|
const {loading, error, data} = useQuery(QUERY_ALL_VENDORS_FOR_ORDER, {
|
||||||
skip: !visible,
|
skip: !visible,
|
||||||
variables: { jobId: jobId },
|
variables: {jobId: jobId},
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
});
|
});
|
||||||
@@ -177,10 +162,10 @@ export function PartsOrderModalContainer({
|
|||||||
|
|
||||||
if (values.vendorid === bodyshop.inhousevendorid) {
|
if (values.vendorid === bodyshop.inhousevendorid) {
|
||||||
setBillEnterContext({
|
setBillEnterContext({
|
||||||
actions: { refetch: refetch },
|
actions: {refetch: refetch},
|
||||||
context: {
|
context: {
|
||||||
disableInvNumber: true,
|
disableInvNumber: true,
|
||||||
job: { id: jobId },
|
job: {id: jobId},
|
||||||
bill: {
|
bill: {
|
||||||
vendorid: bodyshop.inhousevendorid,
|
vendorid: bodyshop.inhousevendorid,
|
||||||
invoice_number: "ih",
|
invoice_number: "ih",
|
||||||
@@ -334,7 +319,7 @@ export function PartsOrderModalContainer({
|
|||||||
quantity: value.part_qty,
|
quantity: value.part_qty,
|
||||||
job_line_id: isReturn ? value.joblineid : value.id,
|
job_line_id: isReturn ? value.joblineid : value.id,
|
||||||
part_type: value.part_type,
|
part_type: value.part_type,
|
||||||
...(isReturn && { cm_received: false }),
|
...(isReturn && {cm_received: false}),
|
||||||
});
|
});
|
||||||
return acc;
|
return acc;
|
||||||
}, [])
|
}, [])
|
||||||
@@ -358,13 +343,13 @@ export function PartsOrderModalContainer({
|
|||||||
}
|
}
|
||||||
onCancel={() => toggleModalVisible()}
|
onCancel={() => toggleModalVisible()}
|
||||||
onOk={() => form.submit()}
|
onOk={() => form.submit()}
|
||||||
okButtonProps={{ loading: saving }}
|
okButtonProps={{loading: saving}}
|
||||||
cancelButtonProps={{ loading: saving }}
|
cancelButtonProps={{loading: saving}}
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
width="75%"
|
width="75%"
|
||||||
forceRender
|
forceRender
|
||||||
>
|
>
|
||||||
{error ? <AlertComponent message={error.message} type="error" /> : null}
|
{error ? <AlertComponent message={error.message} type="error"/> : null}
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
@@ -373,7 +358,7 @@ export function PartsOrderModalContainer({
|
|||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
>
|
>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<LoadingSpinner />
|
<LoadingSpinner/>
|
||||||
) : (
|
) : (
|
||||||
<PartsOrderModalComponent
|
<PartsOrderModalComponent
|
||||||
form={form}
|
form={form}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
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";
|
||||||
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 DatePickerFormItem from "../form-date-picker/form-date-picker.component";
|
import DatePickerFormItem from "../form-date-picker/form-date-picker.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import JobSearchSelect from "../job-search-select/job-search-select.component";
|
import JobSearchSelect from "../job-search-select/job-search-select.component";
|
||||||
@@ -15,18 +15,16 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function PaymentFormComponent({
|
export function PaymentFormComponent({form, bodyshop, disabled,}) {
|
||||||
form,
|
|
||||||
bodyshop,
|
|
||||||
disabled,
|
|
||||||
}) {
|
|
||||||
const { Qb_Multi_Ar } = useTreatments(
|
|
||||||
["Qb_Multi_Ar"],
|
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const {treatments: {Qb_Multi_Ar}} = useSplitTreatments({
|
||||||
|
attributes: {},
|
||||||
|
names: ["Qb_Multi_Ar"],
|
||||||
|
splitKey: bodyshop && bodyshop.imexshopid,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const {t} = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -41,14 +39,14 @@ export function PaymentFormComponent({
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<JobSearchSelect disabled={disabled} notExported={false} clm_no />
|
<JobSearchSelect disabled={disabled} notExported={false} clm_no/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
shouldUpdate={(prev, cur) => cur.jobid && prev.jobid !== cur.jobid}
|
shouldUpdate={(prev, cur) => cur.jobid && prev.jobid !== cur.jobid}
|
||||||
>
|
>
|
||||||
{() => {
|
{() => {
|
||||||
return (
|
return (
|
||||||
<PaymentFormTotalPayments jobid={form.getFieldValue("jobid")} />
|
<PaymentFormTotalPayments jobid={form.getFieldValue("jobid")}/>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -65,16 +63,16 @@ export function PaymentFormComponent({
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<CurrencyInput disabled={disabled} />
|
<CurrencyInput disabled={disabled}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("payments.fields.transactionid")}
|
label={t("payments.fields.transactionid")}
|
||||||
name="transactionid"
|
name="transactionid"
|
||||||
>
|
>
|
||||||
<Input disabled={disabled} />
|
<Input disabled={disabled}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("payments.fields.memo")} name="memo">
|
<Form.Item label={t("payments.fields.memo")} name="memo">
|
||||||
<Input disabled={disabled} />
|
<Input disabled={disabled}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("payments.fields.date")}
|
label={t("payments.fields.date")}
|
||||||
@@ -86,7 +84,7 @@ export function PaymentFormComponent({
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<DatePickerFormItem disabled={disabled} />
|
<DatePickerFormItem disabled={disabled}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
|
||||||
@@ -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,29 +1,19 @@
|
|||||||
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";
|
||||||
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 { 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
|
||||||
);
|
);
|
||||||
@@ -60,11 +47,11 @@ export function ProductionListTable({
|
|||||||
.tableState) ||
|
.tableState) ||
|
||||||
bodyshop.production_config[0]?.columns.tableState || {
|
bodyshop.production_config[0]?.columns.tableState || {
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
filteredInfo: { text: "" },
|
filteredInfo: {text: ""},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const {t} = useTranslation();
|
||||||
|
|
||||||
const matchingColumnConfig = useMemo(() => {
|
const matchingColumnConfig = useMemo(() => {
|
||||||
return bodyshop.production_config.find((p) => p.name === defaultView);
|
return bodyshop.production_config.find((p) => p.name === defaultView);
|
||||||
@@ -91,7 +78,7 @@ export function ProductionListTable({
|
|||||||
setState({
|
setState({
|
||||||
...state,
|
...state,
|
||||||
filteredInfo: filters,
|
filteredInfo: filters,
|
||||||
sortedInfo: { columnKey: sorter.columnKey, order: sorter.order },
|
sortedInfo: {columnKey: sorter.columnKey, order: sorter.order},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -103,13 +90,13 @@ export function ProductionListTable({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const removeColumn = (e) => {
|
const removeColumn = (e) => {
|
||||||
const { key } = e;
|
const {key} = e;
|
||||||
setColumns(columns.filter((i) => i.key !== key));
|
setColumns(columns.filter((i) => i.key !== key));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleResize =
|
const handleResize =
|
||||||
(index) =>
|
(index) =>
|
||||||
(e, { size }) => {
|
(e, {size}) => {
|
||||||
const nextColumns = [...columns];
|
const nextColumns = [...columns];
|
||||||
nextColumns[index] = {
|
nextColumns[index] = {
|
||||||
...nextColumns[index],
|
...nextColumns[index],
|
||||||
@@ -222,7 +209,7 @@ export function ProductionListTable({
|
|||||||
extra={
|
extra={
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Button onClick={() => refetch && refetch()}>
|
<Button onClick={() => refetch && refetch()}>
|
||||||
<SyncOutlined />
|
<SyncOutlined/>
|
||||||
</Button>
|
</Button>
|
||||||
<ProductionListColumnsAdd
|
<ProductionListColumnsAdd
|
||||||
columnState={[columns, setColumns]}
|
columnState={[columns, setColumns]}
|
||||||
@@ -244,11 +231,11 @@ export function ProductionListTable({
|
|||||||
placeholder={t("general.labels.search")}
|
placeholder={t("general.labels.search")}
|
||||||
value={searchText}
|
value={searchText}
|
||||||
/>
|
/>
|
||||||
<ProductionListPrint />
|
<ProductionListPrint/>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<ProductionListDetail jobs={dataSource} />
|
<ProductionListDetail jobs={dataSource}/>
|
||||||
<ReactDragListView.DragColumn
|
<ReactDragListView.DragColumn
|
||||||
onDragEnd={onDragEnd}
|
onDragEnd={onDragEnd}
|
||||||
nodeSelector="th"
|
nodeSelector="th"
|
||||||
@@ -308,7 +295,7 @@ export function ProductionListTable({
|
|||||||
rowKey="id"
|
rowKey="id"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
scroll={{ x: 1000 }}
|
scroll={{x: 1000}}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
/>
|
/>
|
||||||
</ReactDragListView.DragColumn>
|
</ReactDragListView.DragColumn>
|
||||||
|
|||||||
@@ -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,10 +1,10 @@
|
|||||||
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";
|
||||||
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 ShopInfoGeneral from "./shop-info.general.component";
|
import ShopInfoGeneral from "./shop-info.general.component";
|
||||||
import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component";
|
import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component";
|
||||||
import ShopInfoLaborRates from "./shop-info.laborrates.component";
|
import ShopInfoLaborRates from "./shop-info.laborrates.component";
|
||||||
@@ -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({
|
||||||
@@ -26,13 +26,15 @@ 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();
|
||||||
const search = queryString.parse(location.search);
|
const search = queryString.parse(location.search);
|
||||||
@@ -58,42 +60,42 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Tabs.TabPane key="general" tab={t("bodyshop.labels.shopinfo")}>
|
<Tabs.TabPane key="general" tab={t("bodyshop.labels.shopinfo")}>
|
||||||
<ShopInfoGeneral form={form} />
|
<ShopInfoGeneral form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane key="speedprint" tab={t("bodyshop.labels.speedprint")}>
|
<Tabs.TabPane key="speedprint" tab={t("bodyshop.labels.speedprint")}>
|
||||||
<ShopInfoSpeedPrint form={form} />
|
<ShopInfoSpeedPrint form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane key="rbac" tab={t("bodyshop.labels.rbac")}>
|
<Tabs.TabPane key="rbac" tab={t("bodyshop.labels.rbac")}>
|
||||||
<ShopInfoRbacComponent form={form} />
|
<ShopInfoRbacComponent form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane key="roStatus" tab={t("bodyshop.labels.jobstatuses")}>
|
<Tabs.TabPane key="roStatus" tab={t("bodyshop.labels.jobstatuses")}>
|
||||||
<ShopInfoROStatusComponent form={form} />
|
<ShopInfoROStatusComponent form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane key="scheduling" tab={t("bodyshop.labels.scheduling")}>
|
<Tabs.TabPane key="scheduling" tab={t("bodyshop.labels.scheduling")}>
|
||||||
<ShopInfoSchedulingComponent form={form} />
|
<ShopInfoSchedulingComponent form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane
|
<Tabs.TabPane
|
||||||
key="orderStatus"
|
key="orderStatus"
|
||||||
tab={t("bodyshop.labels.orderstatuses")}
|
tab={t("bodyshop.labels.orderstatuses")}
|
||||||
>
|
>
|
||||||
<ShopInfoOrderStatusComponent form={form} />
|
<ShopInfoOrderStatusComponent form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane
|
<Tabs.TabPane
|
||||||
key="responsibilityCenters"
|
key="responsibilityCenters"
|
||||||
tab={t("bodyshop.labels.responsibilitycenters.title")}
|
tab={t("bodyshop.labels.responsibilitycenters.title")}
|
||||||
>
|
>
|
||||||
<ShopInfoResponsibilityCenterComponent form={form} />
|
<ShopInfoResponsibilityCenterComponent form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
|
|
||||||
<Tabs.TabPane key="checklists" tab={t("bodyshop.labels.checklists")}>
|
<Tabs.TabPane key="checklists" tab={t("bodyshop.labels.checklists")}>
|
||||||
<ShopInfoIntakeChecklistComponent form={form} />
|
<ShopInfoIntakeChecklistComponent form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane key="laborrates" tab={t("bodyshop.labels.laborrates")}>
|
<Tabs.TabPane key="laborrates" tab={t("bodyshop.labels.laborrates")}>
|
||||||
<ShopInfoLaborRates form={form} />
|
<ShopInfoLaborRates form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
{CriticalPartsScanning.treatment === "on" && (
|
{CriticalPartsScanning.treatment === "on" && (
|
||||||
<Tabs.TabPane key="partsscan" tab={t("bodyshop.labels.partsscan")}>
|
<Tabs.TabPane key="partsscan" tab={t("bodyshop.labels.partsscan")}>
|
||||||
<ShopInfoPartsScan form={form} />
|
<ShopInfoPartsScan form={form}/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
)}
|
)}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|||||||
@@ -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>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import { Form, Input } from "antd";
|
import {Form, Input} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
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,
|
||||||
});
|
});
|
||||||
@@ -17,13 +18,15 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(ShopInfoOrderStatusComponent);
|
)(ShopInfoOrderStatusComponent);
|
||||||
|
|
||||||
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
|
||||||
@@ -36,7 +39,7 @@ export function ShopInfoOrderStatusComponent({ bodyshop, form }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_order_statuses", "default_bo"]}
|
name={["md_order_statuses", "default_bo"]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.statuses.default_ordered")}
|
label={t("bodyshop.fields.statuses.default_ordered")}
|
||||||
@@ -48,7 +51,7 @@ export function ShopInfoOrderStatusComponent({ bodyshop, form }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_order_statuses", "default_ordered"]}
|
name={["md_order_statuses", "default_ordered"]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -61,7 +64,7 @@ export function ShopInfoOrderStatusComponent({ bodyshop, form }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_order_statuses", "default_received"]}
|
name={["md_order_statuses", "default_received"]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.statuses.default_returned")}
|
label={t("bodyshop.fields.statuses.default_returned")}
|
||||||
@@ -73,7 +76,7 @@ export function ShopInfoOrderStatusComponent({ bodyshop, form }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_order_statuses", "default_returned"]}
|
name={["md_order_statuses", "default_returned"]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{OEConnection.treatment === "on" && (
|
{OEConnection.treatment === "on" && (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -86,7 +89,7 @@ export function ShopInfoOrderStatusComponent({ bodyshop, form }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_order_statuses", "default_quote"]}
|
name={["md_order_statuses", "default_quote"]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
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";
|
||||||
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 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,
|
||||||
});
|
});
|
||||||
@@ -18,13 +19,16 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(ShopInfoRbacComponent);
|
)(ShopInfoRbacComponent);
|
||||||
|
|
||||||
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>
|
||||||
@@ -38,7 +42,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "accounting:payables"]}
|
name={["md_rbac", "accounting:payables"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.accounting.exportlog")}
|
label={t("bodyshop.fields.rbac.accounting.exportlog")}
|
||||||
@@ -50,7 +54,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "accounting:exportlog"]}
|
name={["md_rbac", "accounting:exportlog"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.accounting.payments")}
|
label={t("bodyshop.fields.rbac.accounting.payments")}
|
||||||
@@ -62,7 +66,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "accounting:payments"]}
|
name={["md_rbac", "accounting:payments"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.accounting.receivables")}
|
label={t("bodyshop.fields.rbac.accounting.receivables")}
|
||||||
@@ -74,7 +78,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "accounting:receivables"]}
|
name={["md_rbac", "accounting:receivables"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.csi.page")}
|
label={t("bodyshop.fields.rbac.csi.page")}
|
||||||
@@ -86,7 +90,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "csi:page"]}
|
name={["md_rbac", "csi:page"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.csi.export")}
|
label={t("bodyshop.fields.rbac.csi.export")}
|
||||||
@@ -98,7 +102,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "csi:export"]}
|
name={["md_rbac", "csi:export"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.contracts.create")}
|
label={t("bodyshop.fields.rbac.contracts.create")}
|
||||||
@@ -110,7 +114,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "contracts:create"]}
|
name={["md_rbac", "contracts:create"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.contracts.detail")}
|
label={t("bodyshop.fields.rbac.contracts.detail")}
|
||||||
@@ -122,7 +126,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "contracts:detail"]}
|
name={["md_rbac", "contracts:detail"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.contracts.list")}
|
label={t("bodyshop.fields.rbac.contracts.list")}
|
||||||
@@ -134,7 +138,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "contracts:list"]}
|
name={["md_rbac", "contracts:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.create")}
|
label={t("bodyshop.fields.rbac.courtesycar.create")}
|
||||||
@@ -146,7 +150,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "courtesycar:create"]}
|
name={["md_rbac", "courtesycar:create"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.detail")}
|
label={t("bodyshop.fields.rbac.courtesycar.detail")}
|
||||||
@@ -158,7 +162,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "courtesycar:detail"]}
|
name={["md_rbac", "courtesycar:detail"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.list")}
|
label={t("bodyshop.fields.rbac.courtesycar.list")}
|
||||||
@@ -170,7 +174,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "courtesycar:list"]}
|
name={["md_rbac", "courtesycar:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-active")}
|
label={t("bodyshop.fields.rbac.jobs.list-active")}
|
||||||
@@ -182,7 +186,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:list-active"]}
|
name={["md_rbac", "jobs:list-active"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-ready")}
|
label={t("bodyshop.fields.rbac.jobs.list-ready")}
|
||||||
@@ -194,7 +198,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:list-ready"]}
|
name={["md_rbac", "jobs:list-ready"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.admin")}
|
label={t("bodyshop.fields.rbac.jobs.admin")}
|
||||||
@@ -206,7 +210,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:admin"]}
|
name={["md_rbac", "jobs:admin"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.partsqueue")}
|
label={t("bodyshop.fields.rbac.jobs.partsqueue")}
|
||||||
@@ -218,7 +222,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:partsqueue"]}
|
name={["md_rbac", "jobs:partsqueue"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-all")}
|
label={t("bodyshop.fields.rbac.jobs.list-all")}
|
||||||
@@ -230,7 +234,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:list-all"]}
|
name={["md_rbac", "jobs:list-all"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.available-list")}
|
label={t("bodyshop.fields.rbac.jobs.available-list")}
|
||||||
@@ -242,7 +246,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:available-list"]}
|
name={["md_rbac", "jobs:available-list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.create")}
|
label={t("bodyshop.fields.rbac.jobs.create")}
|
||||||
@@ -254,7 +258,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:create"]}
|
name={["md_rbac", "jobs:create"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.intake")}
|
label={t("bodyshop.fields.rbac.jobs.intake")}
|
||||||
@@ -266,7 +270,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:intake"]}
|
name={["md_rbac", "jobs:intake"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.close")}
|
label={t("bodyshop.fields.rbac.jobs.close")}
|
||||||
@@ -278,7 +282,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:close"]}
|
name={["md_rbac", "jobs:close"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.deliver")}
|
label={t("bodyshop.fields.rbac.jobs.deliver")}
|
||||||
@@ -290,7 +294,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:deliver"]}
|
name={["md_rbac", "jobs:deliver"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.detail")}
|
label={t("bodyshop.fields.rbac.jobs.detail")}
|
||||||
@@ -302,7 +306,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:detail"]}
|
name={["md_rbac", "jobs:detail"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.checklist-view")}
|
label={t("bodyshop.fields.rbac.jobs.checklist-view")}
|
||||||
@@ -314,7 +318,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:checklist-view"]}
|
name={["md_rbac", "jobs:checklist-view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.void")}
|
label={t("bodyshop.fields.rbac.jobs.void")}
|
||||||
@@ -326,7 +330,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:void"]}
|
name={["md_rbac", "jobs:void"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.bills.enter")}
|
label={t("bodyshop.fields.rbac.bills.enter")}
|
||||||
@@ -338,7 +342,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "bills:enter"]}
|
name={["md_rbac", "bills:enter"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.bills.delete")}
|
label={t("bodyshop.fields.rbac.bills.delete")}
|
||||||
@@ -350,7 +354,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "bills:delete"]}
|
name={["md_rbac", "bills:delete"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.bills.reexport")}
|
label={t("bodyshop.fields.rbac.bills.reexport")}
|
||||||
@@ -362,7 +366,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "bills:reexport"]}
|
name={["md_rbac", "bills:reexport"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.bills.view")}
|
label={t("bodyshop.fields.rbac.bills.view")}
|
||||||
@@ -374,7 +378,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "bills:view"]}
|
name={["md_rbac", "bills:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.bills.list")}
|
label={t("bodyshop.fields.rbac.bills.list")}
|
||||||
@@ -386,7 +390,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "bills:list"]}
|
name={["md_rbac", "bills:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.employees.page")}
|
label={t("bodyshop.fields.rbac.employees.page")}
|
||||||
@@ -398,7 +402,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "employees:page"]}
|
name={["md_rbac", "employees:page"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.owners.list")}
|
label={t("bodyshop.fields.rbac.owners.list")}
|
||||||
@@ -410,7 +414,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "owners:list"]}
|
name={["md_rbac", "owners:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.owners.detail")}
|
label={t("bodyshop.fields.rbac.owners.detail")}
|
||||||
@@ -422,7 +426,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "owners:detail"]}
|
name={["md_rbac", "owners:detail"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.payments.enter")}
|
label={t("bodyshop.fields.rbac.payments.enter")}
|
||||||
@@ -434,7 +438,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "payments:enter"]}
|
name={["md_rbac", "payments:enter"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.payments.list")}
|
label={t("bodyshop.fields.rbac.payments.list")}
|
||||||
@@ -446,7 +450,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "payments:list"]}
|
name={["md_rbac", "payments:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.production.board")}
|
label={t("bodyshop.fields.rbac.production.board")}
|
||||||
@@ -458,7 +462,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "production:board"]}
|
name={["md_rbac", "production:board"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.production.list")}
|
label={t("bodyshop.fields.rbac.production.list")}
|
||||||
@@ -470,7 +474,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "production:list"]}
|
name={["md_rbac", "production:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.schedule.view")}
|
label={t("bodyshop.fields.rbac.schedule.view")}
|
||||||
@@ -482,7 +486,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "schedule:view"]}
|
name={["md_rbac", "schedule:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.scoreboard.view")}
|
label={t("bodyshop.fields.rbac.scoreboard.view")}
|
||||||
@@ -494,7 +498,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "scoreboard:view"]}
|
name={["md_rbac", "scoreboard:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shiftclock.view")}
|
label={t("bodyshop.fields.rbac.shiftclock.view")}
|
||||||
@@ -506,7 +510,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "shiftclock:view"]}
|
name={["md_rbac", "shiftclock:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.timetickets.edit")}
|
label={t("bodyshop.fields.rbac.timetickets.edit")}
|
||||||
@@ -518,7 +522,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "timetickets:edit"]}
|
name={["md_rbac", "timetickets:edit"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.timetickets.shiftedit")}
|
label={t("bodyshop.fields.rbac.timetickets.shiftedit")}
|
||||||
@@ -530,7 +534,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "timetickets:shiftedit"]}
|
name={["md_rbac", "timetickets:shiftedit"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.vendors")}
|
label={t("bodyshop.fields.rbac.shop.vendors")}
|
||||||
@@ -542,7 +546,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "shop:vendors"]}
|
name={["md_rbac", "shop:vendors"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.dashboard")}
|
label={t("bodyshop.fields.rbac.shop.dashboard")}
|
||||||
@@ -554,7 +558,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "shop:dashboard"]}
|
name={["md_rbac", "shop:dashboard"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.config")}
|
label={t("bodyshop.fields.rbac.shop.config")}
|
||||||
@@ -566,7 +570,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "shop:config"]}
|
name={["md_rbac", "shop:config"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.rbac")}
|
label={t("bodyshop.fields.rbac.shop.rbac")}
|
||||||
@@ -578,7 +582,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "shop:rbac"]}
|
name={["md_rbac", "shop:rbac"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.templates")}
|
label={t("bodyshop.fields.rbac.shop.templates")}
|
||||||
@@ -590,7 +594,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "shop:templates"]}
|
name={["md_rbac", "shop:templates"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.timetickets.enter")}
|
label={t("bodyshop.fields.rbac.timetickets.enter")}
|
||||||
@@ -602,7 +606,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "timetickets:enter"]}
|
name={["md_rbac", "timetickets:enter"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.timetickets.list")}
|
label={t("bodyshop.fields.rbac.timetickets.list")}
|
||||||
@@ -614,7 +618,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "timetickets:list"]}
|
name={["md_rbac", "timetickets:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.users.editaccess")}
|
label={t("bodyshop.fields.rbac.users.editaccess")}
|
||||||
@@ -626,7 +630,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "users:editaccess"]}
|
name={["md_rbac", "users:editaccess"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.temporarydocs.view")}
|
label={t("bodyshop.fields.rbac.temporarydocs.view")}
|
||||||
@@ -638,7 +642,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "temporarydocs:view"]}
|
name={["md_rbac", "temporarydocs:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.phonebook.view")}
|
label={t("bodyshop.fields.rbac.phonebook.view")}
|
||||||
@@ -650,7 +654,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "phonebook:view"]}
|
name={["md_rbac", "phonebook:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.phonebook.edit")}
|
label={t("bodyshop.fields.rbac.phonebook.edit")}
|
||||||
@@ -662,7 +666,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "phonebook:edit"]}
|
name={["md_rbac", "phonebook:edit"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{Simple_Inventory.treatment === "on" && (
|
{Simple_Inventory.treatment === "on" && (
|
||||||
<>
|
<>
|
||||||
@@ -676,7 +680,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "inventory:list"]}
|
name={["md_rbac", "inventory:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.inventory.delete")}
|
label={t("bodyshop.fields.rbac.inventory.delete")}
|
||||||
@@ -688,7 +692,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
]}
|
]}
|
||||||
name={["md_rbac", "inventory:delete"]}
|
name={["md_rbac", "inventory:delete"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,16 @@
|
|||||||
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";
|
import {useTranslation} from "react-i18next";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
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 }) {
|
|
||||||
const { t } = useTranslation();
|
export function ShopInfoROStatusComponent({bodyshop, form}) {
|
||||||
const { Production_List_Status_Colors } = useTreatments(
|
|
||||||
["Production_List_Status_Colors"],
|
const {t} = useTranslation();
|
||||||
{},
|
|
||||||
bodyshop.imexshopid
|
const { treatments: {Production_List_Status_Colors} } = useSplitTreatments({
|
||||||
);
|
attributes: {},
|
||||||
|
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"]) || []
|
||||||
@@ -56,7 +60,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Select mode="tags" onBlur={handleBlur} />
|
<Select mode="tags" onBlur={handleBlur}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={["md_ro_statuses", "active_statuses"]}
|
name={["md_ro_statuses", "active_statuses"]}
|
||||||
@@ -325,16 +329,16 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
|
|||||||
id="production_colors"
|
id="production_colors"
|
||||||
>
|
>
|
||||||
<Form.List name={["md_ro_statuses", "production_colors"]}>
|
<Form.List name={["md_ro_statuses", "production_colors"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, {add, remove, move}) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<Form.Item key={field.key}>
|
<Form.Item key={field.key}>
|
||||||
<Space direction="vertical">
|
<Space direction="vertical">
|
||||||
<div style={{ display: "flex" }}>
|
<div style={{display: "flex"}}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
style={{ flex: 1 }}
|
style={{flex: 1}}
|
||||||
label={t("jobs.fields.status")}
|
label={t("jobs.fields.status")}
|
||||||
key={`${index}status`}
|
key={`${index}status`}
|
||||||
name={[field.name, "status"]}
|
name={[field.name, "status"]}
|
||||||
@@ -370,7 +374,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<ColorPicker />
|
<ColorPicker/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Space>
|
</Space>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -382,7 +386,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
add();
|
add();
|
||||||
}}
|
}}
|
||||||
style={{ width: "100%" }}
|
style={{width: "100%"}}
|
||||||
>
|
>
|
||||||
{t("general.actions.add")}
|
{t("general.actions.add")}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -397,7 +401,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ColorPicker = ({ value, onChange, style, ...restProps }) => {
|
export const ColorPicker = ({value, onChange, style, ...restProps}) => {
|
||||||
const handleChange = (color) => {
|
const handleChange = (color) => {
|
||||||
if (onChange) onChange(color.rgb);
|
if (onChange) onChange(color.rgb);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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,23 +27,19 @@ export default connect(
|
|||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
)(VendorsFormComponent);
|
)(VendorsFormComponent);
|
||||||
|
|
||||||
export function VendorsFormComponent({
|
export function VendorsFormComponent({bodyshop, form, formLoading, handleDelete, responsibilityCenters, selectedvendor}) {
|
||||||
bodyshop,
|
const {t} = useTranslation();
|
||||||
form,
|
|
||||||
formLoading,
|
|
||||||
handleDelete,
|
|
||||||
responsibilityCenters,
|
|
||||||
selectedvendor,
|
|
||||||
}) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
const { DmsAp } = useTreatments(
|
|
||||||
["DmsAp"],
|
|
||||||
{},
|
|
||||||
bodyshop && bodyshop.imexshopid
|
|
||||||
);
|
|
||||||
|
|
||||||
const { getFieldValue } = form;
|
|
||||||
|
const {treatments: {DmsAp}} = useSplitTreatments({
|
||||||
|
attributes: {},
|
||||||
|
names: ["DmsAp"],
|
||||||
|
splitKey: bodyshop && bodyshop.imexshopid
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const {getFieldValue} = form;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
@@ -67,7 +54,7 @@ export function VendorsFormComponent({
|
|||||||
initialValue={true}
|
initialValue={true}
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
>
|
>
|
||||||
<Switch />
|
<Switch/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => form.submit()}
|
onClick={() => form.submit()}
|
||||||
@@ -92,7 +79,7 @@ export function VendorsFormComponent({
|
|||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<FormFieldsChanged form={form} />
|
<FormFieldsChanged form={form}/>
|
||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("vendors.fields.name")}
|
label={t("vendors.fields.name")}
|
||||||
@@ -104,7 +91,7 @@ export function VendorsFormComponent({
|
|||||||
required: true,
|
required: true,
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
({ getFieldValue }) => ({
|
({getFieldValue}) => ({
|
||||||
async validator(rule, value) {
|
async validator(rule, value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
const response = await client.query({
|
const response = await client.query({
|
||||||
@@ -133,7 +120,7 @@ export function VendorsFormComponent({
|
|||||||
}),
|
}),
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -148,47 +135,47 @@ export function VendorsFormComponent({
|
|||||||
}
|
}
|
||||||
name="email"
|
name="email"
|
||||||
>
|
>
|
||||||
<FormItemEmail email={getFieldValue("email")} />
|
<FormItemEmail email={getFieldValue("email")}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("vendors.fields.phone")}
|
label={t("vendors.fields.phone")}
|
||||||
name="phone"
|
name="phone"
|
||||||
rules={[
|
rules={[
|
||||||
({ getFieldValue }) =>
|
({getFieldValue}) =>
|
||||||
PhoneItemFormatterValidation(getFieldValue, "phone"),
|
PhoneItemFormatterValidation(getFieldValue, "phone"),
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<PhoneFormItem />
|
<PhoneFormItem/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow>
|
||||||
<Form.Item label={t("vendors.fields.street1")} name="street1">
|
<Form.Item label={t("vendors.fields.street1")} name="street1">
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("vendors.fields.street2")} name="street2">
|
<Form.Item label={t("vendors.fields.street2")} name="street2">
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("vendors.fields.city")} name="city">
|
<Form.Item label={t("vendors.fields.city")} name="city">
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow>
|
||||||
<Form.Item label={t("vendors.fields.state")} name="state">
|
<Form.Item label={t("vendors.fields.state")} name="state">
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("vendors.fields.zip")} name="zip">
|
<Form.Item label={t("vendors.fields.zip")} name="zip">
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("vendors.fields.country")} name="country">
|
<Form.Item label={t("vendors.fields.country")} name="country">
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow grow>
|
<LayoutFormRow grow>
|
||||||
<Form.Item label={t("vendors.fields.discount")} name="discount">
|
<Form.Item label={t("vendors.fields.discount")} name="discount">
|
||||||
<InputNumber min={0} max={1} precision={2} step={0.01} />
|
<InputNumber min={0} max={1} precision={2} step={0.01}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("vendors.fields.due_date")} name="due_date">
|
<Form.Item label={t("vendors.fields.due_date")} name="due_date">
|
||||||
<InputNumber min={0} />
|
<InputNumber min={0}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{
|
{
|
||||||
// <Form.Item
|
// <Form.Item
|
||||||
@@ -209,12 +196,12 @@ export function VendorsFormComponent({
|
|||||||
|
|
||||||
{DmsAp.treatment === "on" && (
|
{DmsAp.treatment === "on" && (
|
||||||
<Form.Item label={t("vendors.fields.dmsid")} name="dmsid">
|
<Form.Item label={t("vendors.fields.dmsid")} name="dmsid">
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
<Divider align="left">{t("vendors.labels.preferredmakes")}</Divider>
|
<Divider align="left">{t("vendors.labels.preferredmakes")}</Divider>
|
||||||
<Form.List name="favorite">
|
<Form.List name="favorite">
|
||||||
{(fields, { add, remove }) => {
|
{(fields, {add, remove}) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
@@ -231,7 +218,7 @@ export function VendorsFormComponent({
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input />
|
<Input/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
@@ -248,7 +235,7 @@ export function VendorsFormComponent({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
add();
|
add();
|
||||||
}}
|
}}
|
||||||
style={{ width: "100%" }}
|
style={{width: "100%"}}
|
||||||
>
|
>
|
||||||
{t("vendors.actions.newpreferredmake")}
|
{t("vendors.actions.newpreferredmake")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -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