Added void status to shop info BOD-195
This commit is contained in:
@@ -2505,6 +2505,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>default_void</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>open_statuses</name>
|
<name>open_statuses</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -2722,6 +2743,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>intake</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>jobstatuses</name>
|
<name>jobstatuses</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -12788,27 +12830,6 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
<concept_node>
|
|
||||||
<name>intake</name>
|
|
||||||
<definition_loaded>false</definition_loaded>
|
|
||||||
<description></description>
|
|
||||||
<comment></comment>
|
|
||||||
<default_text></default_text>
|
|
||||||
<translations>
|
|
||||||
<translation>
|
|
||||||
<language>en-US</language>
|
|
||||||
<approved>false</approved>
|
|
||||||
</translation>
|
|
||||||
<translation>
|
|
||||||
<language>es-MX</language>
|
|
||||||
<approved>false</approved>
|
|
||||||
</translation>
|
|
||||||
<translation>
|
|
||||||
<language>fr-CA</language>
|
|
||||||
<approved>false</approved>
|
|
||||||
</translation>
|
|
||||||
</translations>
|
|
||||||
</concept_node>
|
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>job</name>
|
<name>job</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function Test({ bodyshop, setEmailOptions }) {
|
|||||||
}, [stripe]);
|
}, [stripe]);
|
||||||
|
|
||||||
if (paymentRequest) {
|
if (paymentRequest) {
|
||||||
console.log("****************render");
|
|
||||||
return (
|
return (
|
||||||
<div style={{ height: "300px" }}>
|
<div style={{ height: "300px" }}>
|
||||||
<PaymentRequestButtonElement options={{ paymentRequest }} />
|
<PaymentRequestButtonElement options={{ paymentRequest }} />
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ if ("serviceWorker" in navigator) {
|
|||||||
.register("/firebase-messaging-sw.js")
|
.register("/firebase-messaging-sw.js")
|
||||||
.then(function (registration) {
|
.then(function (registration) {
|
||||||
console.log(
|
console.log(
|
||||||
"**********FCM Registration successful, scope is:",
|
"[FCM] Registration successful, scope is:",
|
||||||
registration.scope
|
registration.scope
|
||||||
);
|
);
|
||||||
navigator.serviceWorker.addEventListener("message", (event) => {
|
navigator.serviceWorker.addEventListener("message", (event) => {
|
||||||
@@ -58,7 +58,7 @@ if ("serviceWorker" in navigator) {
|
|||||||
})
|
})
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
console.log(
|
console.log(
|
||||||
"**********FCM Service worker registration failed, error:",
|
"[FCM] Service worker registration failed, error:",
|
||||||
err
|
err
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,84 +17,77 @@ import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
|
|||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component";
|
import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component";
|
||||||
|
|
||||||
export default function ShopInfoComponent({ form }) {
|
export default function ShopInfoComponent({ form, saveLoading }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Button type="primary" htmlType="submit">
|
<Button type='primary' loading={saveLoading} htmlType='submit'>
|
||||||
{t("general.actions.save")}
|
{t("general.actions.save")}
|
||||||
</Button>
|
</Button>
|
||||||
<Collapse defaultActiveKey="shopinfo">
|
<Collapse defaultActiveKey='shopinfo'>
|
||||||
<Collapse.Panel key="shopinfo" header={t("bodyshop.labels.shopinfo")}>
|
<Collapse.Panel key='shopinfo' header={t("bodyshop.labels.shopinfo")}>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
<Form.Item label={t("bodyshop.fields.shopname")} name="shopname">
|
<Form.Item label={t("bodyshop.fields.shopname")} name='shopname'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("bodyshop.fields.address1")} name="address1">
|
<Form.Item label={t("bodyshop.fields.address1")} name='address1'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("bodyshop.fields.address2")} name="address2">
|
<Form.Item label={t("bodyshop.fields.address2")} name='address2'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("bodyshop.fields.city")} name="city">
|
<Form.Item label={t("bodyshop.fields.city")} name='city'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("bodyshop.fields.state")} name="state">
|
<Form.Item label={t("bodyshop.fields.state")} name='state'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("bodyshop.fields.zip_post")} name="zip_post">
|
<Form.Item label={t("bodyshop.fields.zip_post")} name='zip_post'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
<Form.Item label={t("bodyshop.fields.country")} name="country">
|
<Form.Item label={t("bodyshop.fields.country")} name='country'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("bodyshop.fields.email")} name="email">
|
<Form.Item label={t("bodyshop.fields.email")} name='email'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.federal_tax_id")}
|
label={t("bodyshop.fields.federal_tax_id")}
|
||||||
name="federal_tax_id"
|
name='federal_tax_id'>
|
||||||
>
|
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.insurance_vendor_id")}
|
label={t("bodyshop.fields.insurance_vendor_id")}
|
||||||
name="insurance_vendor_id"
|
name='insurance_vendor_id'>
|
||||||
>
|
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.logo_img_path")}
|
label={t("bodyshop.fields.logo_img_path")}
|
||||||
name="logo_img_path"
|
name='logo_img_path'>
|
||||||
>
|
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.state_tax_id")}
|
label={t("bodyshop.fields.state_tax_id")}
|
||||||
name="state_tax_id"
|
name='state_tax_id'>
|
||||||
>
|
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.invoice_federal_tax_rate")}
|
label={t("bodyshop.fields.invoice_federal_tax_rate")}
|
||||||
name={["invoice_tax_rates", "federal_tax_rate"]}
|
name={["invoice_tax_rates", "federal_tax_rate"]}>
|
||||||
>
|
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.invoice_state_tax_rate")}
|
label={t("bodyshop.fields.invoice_state_tax_rate")}
|
||||||
name={["invoice_tax_rates", "state_tax_rate"]}
|
name={["invoice_tax_rates", "state_tax_rate"]}>
|
||||||
>
|
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.invoice_local_tax_rate")}
|
label={t("bodyshop.fields.invoice_local_tax_rate")}
|
||||||
name={["invoice_tax_rates", "local_tax_rate"]}
|
name={["invoice_tax_rates", "local_tax_rate"]}>
|
||||||
>
|
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
@@ -106,8 +99,7 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
required: true,
|
required: true,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
|
||||||
<InputNumber min={15} precision={0} />
|
<InputNumber min={15} precision={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
@@ -120,8 +112,7 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
required: true,
|
required: true,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
|
||||||
<InputNumber min={0} precision={0} />
|
<InputNumber min={0} precision={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
@@ -133,8 +124,7 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
required: true,
|
required: true,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
|
||||||
<InputNumber min={0} precision={0} />
|
<InputNumber min={0} precision={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
@@ -146,8 +136,7 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
required: true,
|
required: true,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
|
||||||
<InputNumber min={0} max={12} precision={0} />
|
<InputNumber min={0} max={12} precision={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -159,9 +148,8 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
type: "array",
|
type: "array",
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
<Select mode='tags' />
|
||||||
<Select mode="tags" />
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.labels.accountingtiers")}
|
label={t("bodyshop.labels.accountingtiers")}
|
||||||
@@ -171,8 +159,7 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["accountingconfig", "tiers"]}
|
name={["accountingconfig", "tiers"]}>
|
||||||
>
|
|
||||||
<Radio.Group>
|
<Radio.Group>
|
||||||
<Radio value={2}>2</Radio>
|
<Radio value={2}>2</Radio>
|
||||||
<Radio value={3}>3</Radio>
|
<Radio value={3}>3</Radio>
|
||||||
@@ -192,17 +179,15 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["accountingconfig", "twotierpref"]}
|
name={["accountingconfig", "twotierpref"]}>
|
||||||
>
|
|
||||||
<Radio.Group
|
<Radio.Group
|
||||||
disabled={
|
disabled={
|
||||||
form.getFieldValue(["accountingconfig", "tiers"]) === 3
|
form.getFieldValue(["accountingconfig", "tiers"]) === 3
|
||||||
}
|
}>
|
||||||
>
|
<Radio value='name'>
|
||||||
<Radio value="name">
|
|
||||||
{t("bodyshop.labels.2tiername")}
|
{t("bodyshop.labels.2tiername")}
|
||||||
</Radio>
|
</Radio>
|
||||||
<Radio value="source">
|
<Radio value='source'>
|
||||||
{t("bodyshop.labels.2tiersource")}
|
{t("bodyshop.labels.2tiersource")}
|
||||||
</Radio>
|
</Radio>
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
@@ -218,8 +203,7 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
key={field.key}
|
key={field.key}
|
||||||
style={{ padding: 0, margin: 2 }}
|
style={{ padding: 0, margin: 2 }}>
|
||||||
>
|
|
||||||
<div style={{ display: "flex" }}>
|
<div style={{ display: "flex" }}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
style={{ padding: 0, margin: 2 }}
|
style={{ padding: 0, margin: 2 }}
|
||||||
@@ -231,8 +215,7 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
required: true,
|
required: true,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -245,8 +228,7 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
required: true,
|
required: true,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
@@ -259,12 +241,11 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
))}
|
))}
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button
|
<Button
|
||||||
type="dashed"
|
type='dashed'
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
add();
|
add();
|
||||||
}}
|
}}
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}>
|
||||||
>
|
|
||||||
{t("general.actions.add")}
|
{t("general.actions.add")}
|
||||||
</Button>
|
</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -274,35 +255,28 @@ export default function ShopInfoComponent({ form }) {
|
|||||||
</Form.List>
|
</Form.List>
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
<Collapse.Panel
|
<Collapse.Panel
|
||||||
key="roStatus"
|
key='roStatus'
|
||||||
header={t("bodyshop.labels.jobstatuses")}
|
header={t("bodyshop.labels.jobstatuses")}>
|
||||||
>
|
|
||||||
<ShopInfoROStatusComponent form={form} />
|
<ShopInfoROStatusComponent form={form} />
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
<Collapse.Panel
|
<Collapse.Panel
|
||||||
key="scheduling"
|
key='scheduling'
|
||||||
header={t("bodyshop.labels.scheduling")}
|
header={t("bodyshop.labels.scheduling")}>
|
||||||
>
|
|
||||||
<ShopInfoSchedulingComponent form={form} />
|
<ShopInfoSchedulingComponent form={form} />
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
<Collapse.Panel
|
<Collapse.Panel
|
||||||
key="orderStatus"
|
key='orderStatus'
|
||||||
header={t("bodyshop.labels.orderstatuses")}
|
header={t("bodyshop.labels.orderstatuses")}>
|
||||||
>
|
|
||||||
<ShopInfoOrderStatusComponent form={form} />
|
<ShopInfoOrderStatusComponent form={form} />
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
<Collapse.Panel
|
<Collapse.Panel
|
||||||
key="responsibilityCenters"
|
key='responsibilityCenters'
|
||||||
header={t("bodyshop.labels.responsibilitycenters.title")}
|
header={t("bodyshop.labels.responsibilitycenters.title")}>
|
||||||
>
|
|
||||||
<ShopInfoResponsibilityCenterComponent form={form} />
|
<ShopInfoResponsibilityCenterComponent form={form} />
|
||||||
</Collapse.Panel>
|
</Collapse.Panel>
|
||||||
<Collapse.Panel
|
<Collapse.Panel key='intake' header={t("bodyshop.labels.intake")}>
|
||||||
key="intake"
|
<ShopInfoIntakeChecklistComponent form={form} />
|
||||||
header={t("bodyshop.labels.intake")}
|
</Collapse.Panel>
|
||||||
>
|
|
||||||
<ShopInfoIntakeChecklistComponent form={form} />
|
|
||||||
</Collapse.Panel>
|
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import ShopInfoComponent from "./shop-info.component";
|
import ShopInfoComponent from "./shop-info.component";
|
||||||
import { Form, notification } from "antd";
|
import { Form, notification } from "antd";
|
||||||
import { useQuery, useMutation } from "@apollo/react-hooks";
|
import { useQuery, useMutation } from "@apollo/react-hooks";
|
||||||
@@ -11,13 +11,14 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
|||||||
export default function ShopInfoContainer() {
|
export default function ShopInfoContainer() {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const [saveLoading, setSaveLoading] = useState(false);
|
||||||
const [updateBodyshop] = useMutation(UPDATE_SHOP);
|
const [updateBodyshop] = useMutation(UPDATE_SHOP);
|
||||||
const { loading, error, data, refetch } = useQuery(QUERY_BODYSHOP, {
|
const { loading, error, data, refetch } = useQuery(QUERY_BODYSHOP, {
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleFinish = (values) => {
|
const handleFinish = (values) => {
|
||||||
console.log("values", values);
|
setSaveLoading(true);
|
||||||
logImEXEvent("shop_update");
|
logImEXEvent("shop_update");
|
||||||
|
|
||||||
updateBodyshop({
|
updateBodyshop({
|
||||||
@@ -32,13 +33,14 @@ export default function ShopInfoContainer() {
|
|||||||
message: t("bodyshop.errors.saving", { message: error }),
|
message: t("bodyshop.errors.saving", { message: error }),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
setSaveLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data) form.resetFields();
|
if (data) form.resetFields();
|
||||||
}, [form, data]);
|
}, [form, data]);
|
||||||
|
|
||||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
if (error) return <AlertComponent message={error.message} type='error' />;
|
||||||
if (loading) return <LoadingSpinner />;
|
if (loading) return <LoadingSpinner />;
|
||||||
return (
|
return (
|
||||||
<Form
|
<Form
|
||||||
@@ -46,9 +48,8 @@ export default function ShopInfoContainer() {
|
|||||||
layout='vertical'
|
layout='vertical'
|
||||||
autoComplete='new-password'
|
autoComplete='new-password'
|
||||||
onFinish={handleFinish}
|
onFinish={handleFinish}
|
||||||
initialValues={data ? data.bodyshops[0] : null}
|
initialValues={data ? data.bodyshops[0] : null}>
|
||||||
>
|
<ShopInfoComponent form={form} saveLoading={saveLoading} />
|
||||||
<ShopInfoComponent form={form} />
|
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
key={field.key}
|
key={field.key}
|
||||||
style={{ padding: 0, margin: 2 }}
|
style={{ padding: 0, margin: 2 }}>
|
||||||
>
|
|
||||||
<div style={{ display: "flex" }}>
|
<div style={{ display: "flex" }}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
style={{ padding: 0, margin: 2 }}
|
style={{ padding: 0, margin: 2 }}
|
||||||
@@ -46,8 +45,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
required: true,
|
required: true,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
|
||||||
<Input onBlur={handleBlur} />
|
<Input onBlur={handleBlur} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<DeleteFilled
|
<DeleteFilled
|
||||||
@@ -60,12 +58,11 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
))}
|
))}
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button
|
<Button
|
||||||
type="dashed"
|
type='dashed'
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
add();
|
add();
|
||||||
}}
|
}}
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}>
|
||||||
>
|
|
||||||
{t("bodyshop.actions.newstatus")}
|
{t("bodyshop.actions.newstatus")}
|
||||||
</Button>
|
</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -85,9 +82,8 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
type: "array",
|
type: "array",
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
<Select mode='multiple'>
|
||||||
<Select mode="multiple">
|
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx} value={item}>
|
<Select.Option key={idx} value={item}>
|
||||||
{item}
|
{item}
|
||||||
@@ -104,9 +100,8 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
type: "array",
|
type: "array",
|
||||||
},
|
},
|
||||||
]}
|
]}>
|
||||||
>
|
<Select mode='multiple'>
|
||||||
<Select mode="multiple">
|
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx} value={item}>
|
<Select.Option key={idx} value={item}>
|
||||||
{item}
|
{item}
|
||||||
@@ -122,8 +117,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_ro_statuses", "default_scheduled"]}
|
name={["md_ro_statuses", "default_scheduled"]}>
|
||||||
>
|
|
||||||
<Select>
|
<Select>
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx}>{item}</Select.Option>
|
<Select.Option key={idx}>{item}</Select.Option>
|
||||||
@@ -138,8 +132,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_ro_statuses", "default_arrived"]}
|
name={["md_ro_statuses", "default_arrived"]}>
|
||||||
>
|
|
||||||
<Select>
|
<Select>
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx}>{item}</Select.Option>
|
<Select.Option key={idx}>{item}</Select.Option>
|
||||||
@@ -154,8 +147,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_ro_statuses", "default_exported"]}
|
name={["md_ro_statuses", "default_exported"]}>
|
||||||
>
|
|
||||||
<Select>
|
<Select>
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx}>{item}</Select.Option>
|
<Select.Option key={idx}>{item}</Select.Option>
|
||||||
@@ -170,8 +162,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_ro_statuses", "default_imported"]}
|
name={["md_ro_statuses", "default_imported"]}>
|
||||||
>
|
|
||||||
<Select>
|
<Select>
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx}>{item}</Select.Option>
|
<Select.Option key={idx}>{item}</Select.Option>
|
||||||
@@ -186,8 +177,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_ro_statuses", "default_invoiced"]}
|
name={["md_ro_statuses", "default_invoiced"]}>
|
||||||
>
|
|
||||||
<Select>
|
<Select>
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx}>{item}</Select.Option>
|
<Select.Option key={idx}>{item}</Select.Option>
|
||||||
@@ -202,8 +192,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_ro_statuses", "default_completed"]}
|
name={["md_ro_statuses", "default_completed"]}>
|
||||||
>
|
|
||||||
<Select>
|
<Select>
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx}>{item}</Select.Option>
|
<Select.Option key={idx}>{item}</Select.Option>
|
||||||
@@ -218,8 +207,22 @@ export default function ShopInfoROStatusComponent({ form }) {
|
|||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_ro_statuses", "default_delivered"]}
|
name={["md_ro_statuses", "default_delivered"]}>
|
||||||
>
|
<Select>
|
||||||
|
{options.map((item, idx) => (
|
||||||
|
<Select.Option key={idx}>{item}</Select.Option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.statuses.default_void")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_ro_statuses", "default_void"]}>
|
||||||
<Select>
|
<Select>
|
||||||
{options.map((item, idx) => (
|
{options.map((item, idx) => (
|
||||||
<Select.Option key={idx}>{item}</Select.Option>
|
<Select.Option key={idx}>{item}</Select.Option>
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ try {
|
|||||||
messaging = firebase.messaging();
|
messaging = firebase.messaging();
|
||||||
// Project Settings => Cloud Messaging => Web Push certificates
|
// Project Settings => Cloud Messaging => Web Push certificates
|
||||||
messaging.usePublicVapidKey(process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY);
|
messaging.usePublicVapidKey(process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY);
|
||||||
console.log("**********[FCM UTIL] FCM initialized successfully.");
|
console.log("[FCM UTIL] FCM initialized successfully.");
|
||||||
} catch {
|
} catch {
|
||||||
console.log("**********[FCM UTIL] Firebase Messaging is likely unsupported.");
|
console.log("[FCM UTIL] Firebase Messaging is likely unsupported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
export { messaging };
|
export { messaging };
|
||||||
@@ -63,7 +63,7 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
|||||||
|
|
||||||
if (messaging) {
|
if (messaging) {
|
||||||
messaging.onMessage(async (payload) => {
|
messaging.onMessage(async (payload) => {
|
||||||
console.log("**********UTILS Message received. ", payload);
|
console.log("[FCM] UTILS Message received. ", payload);
|
||||||
navigator.serviceWorker.getRegistration().then((registration) => {
|
navigator.serviceWorker.getRegistration().then((registration) => {
|
||||||
return registration.showNotification(
|
return registration.showNotification(
|
||||||
"[UTIL]" + payload.notification.title,
|
"[UTIL]" + payload.notification.title,
|
||||||
@@ -97,7 +97,7 @@ if (messaging) {
|
|||||||
messaging
|
messaging
|
||||||
.getToken()
|
.getToken()
|
||||||
.then((refreshedToken) => {
|
.then((refreshedToken) => {
|
||||||
console.log("**********Token refreshed.");
|
console.log("[FCM] Token refreshed.");
|
||||||
// Indicate that the new Instance ID token has not yet been sent to the
|
// Indicate that the new Instance ID token has not yet been sent to the
|
||||||
// app server.
|
// app server.
|
||||||
// setTokenSentToServer(false);
|
// setTokenSentToServer(false);
|
||||||
@@ -109,7 +109,7 @@ if (messaging) {
|
|||||||
// [END_EXCLUDE]
|
// [END_EXCLUDE]
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("**********Unable to retrieve refreshed token ", err);
|
console.log("[FCM] Unable to retrieve refreshed token ", err);
|
||||||
// showToken("Unable to retrieve refreshed token ", err);
|
// showToken("Unable to retrieve refreshed token ", err);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -158,6 +158,7 @@
|
|||||||
"default_received": "Default Received Status",
|
"default_received": "Default Received Status",
|
||||||
"default_returned": "Default Returned",
|
"default_returned": "Default Returned",
|
||||||
"default_scheduled": "Default Scheduled Status",
|
"default_scheduled": "Default Scheduled Status",
|
||||||
|
"default_void": "Default Void",
|
||||||
"open_statuses": "Open Statuses",
|
"open_statuses": "Open Statuses",
|
||||||
"production_statuses": "Production Statuses"
|
"production_statuses": "Production Statuses"
|
||||||
},
|
},
|
||||||
@@ -171,6 +172,7 @@
|
|||||||
"alljobstatuses": "All Job Statuses",
|
"alljobstatuses": "All Job Statuses",
|
||||||
"allopenjobstatuses": "All Open Job Statuses",
|
"allopenjobstatuses": "All Open Job Statuses",
|
||||||
"customtemplates": "Custom Templates",
|
"customtemplates": "Custom Templates",
|
||||||
|
"intake": "Job Intake",
|
||||||
"jobstatuses": "Job Statuses",
|
"jobstatuses": "Job Statuses",
|
||||||
"notemplatesavailable": "No templates available to add.",
|
"notemplatesavailable": "No templates available to add.",
|
||||||
"orderstatuses": "Order Statuses",
|
"orderstatuses": "Order Statuses",
|
||||||
@@ -786,7 +788,6 @@
|
|||||||
"hrs_claimed": "Hours Claimed",
|
"hrs_claimed": "Hours Claimed",
|
||||||
"hrs_total": "Hours Total",
|
"hrs_total": "Hours Total",
|
||||||
"inproduction": "In Production",
|
"inproduction": "In Production",
|
||||||
"intake": "Job Intake",
|
|
||||||
"job": "Job Details",
|
"job": "Job Details",
|
||||||
"jobcosting": "Job Costing",
|
"jobcosting": "Job Costing",
|
||||||
"laborallocations": "Labor Allocations",
|
"laborallocations": "Labor Allocations",
|
||||||
|
|||||||
@@ -158,6 +158,7 @@
|
|||||||
"default_received": "",
|
"default_received": "",
|
||||||
"default_returned": "",
|
"default_returned": "",
|
||||||
"default_scheduled": "",
|
"default_scheduled": "",
|
||||||
|
"default_void": "",
|
||||||
"open_statuses": "",
|
"open_statuses": "",
|
||||||
"production_statuses": ""
|
"production_statuses": ""
|
||||||
},
|
},
|
||||||
@@ -171,6 +172,7 @@
|
|||||||
"alljobstatuses": "",
|
"alljobstatuses": "",
|
||||||
"allopenjobstatuses": "",
|
"allopenjobstatuses": "",
|
||||||
"customtemplates": "",
|
"customtemplates": "",
|
||||||
|
"intake": "",
|
||||||
"jobstatuses": "",
|
"jobstatuses": "",
|
||||||
"notemplatesavailable": "",
|
"notemplatesavailable": "",
|
||||||
"orderstatuses": "",
|
"orderstatuses": "",
|
||||||
@@ -786,7 +788,6 @@
|
|||||||
"hrs_claimed": "",
|
"hrs_claimed": "",
|
||||||
"hrs_total": "",
|
"hrs_total": "",
|
||||||
"inproduction": "",
|
"inproduction": "",
|
||||||
"intake": "",
|
|
||||||
"job": "",
|
"job": "",
|
||||||
"jobcosting": "",
|
"jobcosting": "",
|
||||||
"laborallocations": "",
|
"laborallocations": "",
|
||||||
|
|||||||
@@ -158,6 +158,7 @@
|
|||||||
"default_received": "",
|
"default_received": "",
|
||||||
"default_returned": "",
|
"default_returned": "",
|
||||||
"default_scheduled": "",
|
"default_scheduled": "",
|
||||||
|
"default_void": "",
|
||||||
"open_statuses": "",
|
"open_statuses": "",
|
||||||
"production_statuses": ""
|
"production_statuses": ""
|
||||||
},
|
},
|
||||||
@@ -171,6 +172,7 @@
|
|||||||
"alljobstatuses": "",
|
"alljobstatuses": "",
|
||||||
"allopenjobstatuses": "",
|
"allopenjobstatuses": "",
|
||||||
"customtemplates": "",
|
"customtemplates": "",
|
||||||
|
"intake": "",
|
||||||
"jobstatuses": "",
|
"jobstatuses": "",
|
||||||
"notemplatesavailable": "",
|
"notemplatesavailable": "",
|
||||||
"orderstatuses": "",
|
"orderstatuses": "",
|
||||||
@@ -786,7 +788,6 @@
|
|||||||
"hrs_claimed": "",
|
"hrs_claimed": "",
|
||||||
"hrs_total": "",
|
"hrs_total": "",
|
||||||
"inproduction": "",
|
"inproduction": "",
|
||||||
"intake": "",
|
|
||||||
"job": "",
|
"job": "",
|
||||||
"jobcosting": "",
|
"jobcosting": "",
|
||||||
"laborallocations": "",
|
"laborallocations": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user