diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 99a2c7e9d..4b4dd25ad 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -2505,6 +2505,27 @@ + + default_void + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + open_statuses false @@ -2722,6 +2743,27 @@ + + intake + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + jobstatuses false @@ -12788,27 +12830,6 @@ - - intake - false - - - - - - en-US - false - - - es-MX - false - - - fr-CA - false - - - job false diff --git a/client/src/components/_test/test.component.jsx b/client/src/components/_test/test.component.jsx index d17450f75..26d6df86a 100644 --- a/client/src/components/_test/test.component.jsx +++ b/client/src/components/_test/test.component.jsx @@ -58,7 +58,7 @@ function Test({ bodyshop, setEmailOptions }) { }, [stripe]); if (paymentRequest) { - console.log("****************render"); + return (
diff --git a/client/src/components/fcm-notification/fcm-notification.component.jsx b/client/src/components/fcm-notification/fcm-notification.component.jsx index d7a6f8bad..1d74d6c38 100644 --- a/client/src/components/fcm-notification/fcm-notification.component.jsx +++ b/client/src/components/fcm-notification/fcm-notification.component.jsx @@ -49,7 +49,7 @@ if ("serviceWorker" in navigator) { .register("/firebase-messaging-sw.js") .then(function (registration) { console.log( - "**********FCM Registration successful, scope is:", + "[FCM] Registration successful, scope is:", registration.scope ); navigator.serviceWorker.addEventListener("message", (event) => { @@ -58,7 +58,7 @@ if ("serviceWorker" in navigator) { }) .catch(function (err) { console.log( - "**********FCM Service worker registration failed, error:", + "[FCM] Service worker registration failed, error:", err ); }); diff --git a/client/src/components/shop-info/shop-info.component.jsx b/client/src/components/shop-info/shop-info.component.jsx index 0953d581d..3e0ec7909 100644 --- a/client/src/components/shop-info/shop-info.component.jsx +++ b/client/src/components/shop-info/shop-info.component.jsx @@ -17,84 +17,77 @@ import ShopInfoSchedulingComponent from "./shop-info.scheduling.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component"; -export default function ShopInfoComponent({ form }) { +export default function ShopInfoComponent({ form, saveLoading }) { const { t } = useTranslation(); return (
- - - + + - + - + - + - + - + - + - + - + + name='federal_tax_id'> + name='insurance_vendor_id'> + name='logo_img_path'> + name='state_tax_id'> + name={["invoice_tax_rates", "federal_tax_rate"]}> + name={["invoice_tax_rates", "state_tax_rate"]}> + name={["invoice_tax_rates", "local_tax_rate"]}> @@ -106,8 +99,7 @@ export default function ShopInfoComponent({ form }) { required: true, message: t("general.validation.required"), }, - ]} - > + ]}> @@ -120,8 +112,7 @@ export default function ShopInfoComponent({ form }) { required: true, message: t("general.validation.required"), }, - ]} - > + ]}> @@ -133,8 +124,7 @@ export default function ShopInfoComponent({ form }) { required: true, message: t("general.validation.required"), }, - ]} - > + ]}> @@ -146,8 +136,7 @@ export default function ShopInfoComponent({ form }) { required: true, message: t("general.validation.required"), }, - ]} - > + ]}> - + name={["accountingconfig", "tiers"]}> 2 3 @@ -192,17 +179,15 @@ export default function ShopInfoComponent({ form }) { message: t("general.validation.required"), }, ]} - name={["accountingconfig", "twotierpref"]} - > + name={["accountingconfig", "twotierpref"]}> - + }> + {t("bodyshop.labels.2tiername")} - + {t("bodyshop.labels.2tiersource")} @@ -218,8 +203,7 @@ export default function ShopInfoComponent({ form }) { {fields.map((field, index) => ( + style={{ padding: 0, margin: 2 }}>
+ ]}> + ]}> @@ -274,35 +255,28 @@ export default function ShopInfoComponent({ form }) { + key='roStatus' + header={t("bodyshop.labels.jobstatuses")}> + key='scheduling' + header={t("bodyshop.labels.scheduling")}> + key='orderStatus' + header={t("bodyshop.labels.orderstatuses")}> + key='responsibilityCenters' + header={t("bodyshop.labels.responsibilitycenters.title")}> - - - + + +
); diff --git a/client/src/components/shop-info/shop-info.container.jsx b/client/src/components/shop-info/shop-info.container.jsx index c1355c6c8..8bd6ed8d4 100644 --- a/client/src/components/shop-info/shop-info.container.jsx +++ b/client/src/components/shop-info/shop-info.container.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from "react"; +import React, { useEffect, useState } from "react"; import ShopInfoComponent from "./shop-info.component"; import { Form, notification } from "antd"; import { useQuery, useMutation } from "@apollo/react-hooks"; @@ -11,13 +11,14 @@ import { logImEXEvent } from "../../firebase/firebase.utils"; export default function ShopInfoContainer() { const [form] = Form.useForm(); const { t } = useTranslation(); + const [saveLoading, setSaveLoading] = useState(false); const [updateBodyshop] = useMutation(UPDATE_SHOP); const { loading, error, data, refetch } = useQuery(QUERY_BODYSHOP, { fetchPolicy: "network-only", }); const handleFinish = (values) => { - console.log("values", values); + setSaveLoading(true); logImEXEvent("shop_update"); updateBodyshop({ @@ -32,13 +33,14 @@ export default function ShopInfoContainer() { message: t("bodyshop.errors.saving", { message: error }), }); }); + setSaveLoading(false); }; useEffect(() => { if (data) form.resetFields(); }, [form, data]); - if (error) return ; + if (error) return ; if (loading) return ; return (
- + initialValues={data ? data.bodyshops[0] : null}> + ); } diff --git a/client/src/components/shop-info/shop-info.rostatus.component.jsx b/client/src/components/shop-info/shop-info.rostatus.component.jsx index 3eb11d000..57c076294 100644 --- a/client/src/components/shop-info/shop-info.rostatus.component.jsx +++ b/client/src/components/shop-info/shop-info.rostatus.component.jsx @@ -33,8 +33,7 @@ export default function ShopInfoROStatusComponent({ form }) { {fields.map((field, index) => ( + style={{ padding: 0, margin: 2 }}>
+ ]}> @@ -85,9 +82,8 @@ export default function ShopInfoROStatusComponent({ form }) { message: t("general.validation.required"), type: "array", }, - ]} - > - {options.map((item, idx) => ( {item} @@ -104,9 +100,8 @@ export default function ShopInfoROStatusComponent({ form }) { message: t("general.validation.required"), type: "array", }, - ]} - > - {options.map((item, idx) => ( {item} @@ -122,8 +117,7 @@ export default function ShopInfoROStatusComponent({ form }) { message: t("general.validation.required"), }, ]} - name={["md_ro_statuses", "default_scheduled"]} - > + name={["md_ro_statuses", "default_scheduled"]}> {options.map((item, idx) => ( {item} @@ -154,8 +147,7 @@ export default function ShopInfoROStatusComponent({ form }) { message: t("general.validation.required"), }, ]} - name={["md_ro_statuses", "default_exported"]} - > + name={["md_ro_statuses", "default_exported"]}> {options.map((item, idx) => ( {item} @@ -186,8 +177,7 @@ export default function ShopInfoROStatusComponent({ form }) { message: t("general.validation.required"), }, ]} - name={["md_ro_statuses", "default_invoiced"]} - > + name={["md_ro_statuses", "default_invoiced"]}> {options.map((item, idx) => ( {item} @@ -218,8 +207,22 @@ export default function ShopInfoROStatusComponent({ form }) { message: t("general.validation.required"), }, ]} - name={["md_ro_statuses", "default_delivered"]} - > + name={["md_ro_statuses", "default_delivered"]}> + + +