Added void status to shop info BOD-195
This commit is contained in:
@@ -2505,6 +2505,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</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>
|
||||
<name>open_statuses</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -2722,6 +2743,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</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>
|
||||
<name>jobstatuses</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -12788,27 +12830,6 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</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>
|
||||
<name>job</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -58,7 +58,7 @@ function Test({ bodyshop, setEmailOptions }) {
|
||||
}, [stripe]);
|
||||
|
||||
if (paymentRequest) {
|
||||
console.log("****************render");
|
||||
|
||||
return (
|
||||
<div style={{ height: "300px" }}>
|
||||
<PaymentRequestButtonElement options={{ paymentRequest }} />
|
||||
|
||||
@@ -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
|
||||
);
|
||||
});
|
||||
|
||||
@@ -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 (
|
||||
<div>
|
||||
<Button type="primary" htmlType="submit">
|
||||
<Button type='primary' loading={saveLoading} htmlType='submit'>
|
||||
{t("general.actions.save")}
|
||||
</Button>
|
||||
<Collapse defaultActiveKey="shopinfo">
|
||||
<Collapse.Panel key="shopinfo" header={t("bodyshop.labels.shopinfo")}>
|
||||
<Collapse defaultActiveKey='shopinfo'>
|
||||
<Collapse.Panel key='shopinfo' header={t("bodyshop.labels.shopinfo")}>
|
||||
<LayoutFormRow>
|
||||
<Form.Item label={t("bodyshop.fields.shopname")} name="shopname">
|
||||
<Form.Item label={t("bodyshop.fields.shopname")} name='shopname'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("bodyshop.fields.address1")} name="address1">
|
||||
<Form.Item label={t("bodyshop.fields.address1")} name='address1'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("bodyshop.fields.address2")} name="address2">
|
||||
<Form.Item label={t("bodyshop.fields.address2")} name='address2'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("bodyshop.fields.city")} name="city">
|
||||
<Form.Item label={t("bodyshop.fields.city")} name='city'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("bodyshop.fields.state")} name="state">
|
||||
<Form.Item label={t("bodyshop.fields.state")} name='state'>
|
||||
<Input />
|
||||
</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 />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow>
|
||||
<Form.Item label={t("bodyshop.fields.country")} name="country">
|
||||
<Form.Item label={t("bodyshop.fields.country")} name='country'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("bodyshop.fields.email")} name="email">
|
||||
<Form.Item label={t("bodyshop.fields.email")} name='email'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.federal_tax_id")}
|
||||
name="federal_tax_id"
|
||||
>
|
||||
name='federal_tax_id'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.insurance_vendor_id")}
|
||||
name="insurance_vendor_id"
|
||||
>
|
||||
name='insurance_vendor_id'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.logo_img_path")}
|
||||
name="logo_img_path"
|
||||
>
|
||||
name='logo_img_path'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.state_tax_id")}
|
||||
name="state_tax_id"
|
||||
>
|
||||
name='state_tax_id'>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.invoice_federal_tax_rate")}
|
||||
name={["invoice_tax_rates", "federal_tax_rate"]}
|
||||
>
|
||||
name={["invoice_tax_rates", "federal_tax_rate"]}>
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.invoice_state_tax_rate")}
|
||||
name={["invoice_tax_rates", "state_tax_rate"]}
|
||||
>
|
||||
name={["invoice_tax_rates", "state_tax_rate"]}>
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.invoice_local_tax_rate")}
|
||||
name={["invoice_tax_rates", "local_tax_rate"]}
|
||||
>
|
||||
name={["invoice_tax_rates", "local_tax_rate"]}>
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
|
||||
@@ -106,8 +99,7 @@ export default function ShopInfoComponent({ form }) {
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<InputNumber min={15} precision={0} />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
@@ -120,8 +112,7 @@ export default function ShopInfoComponent({ form }) {
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<InputNumber min={0} precision={0} />
|
||||
</Form.Item>
|
||||
|
||||
@@ -133,8 +124,7 @@ export default function ShopInfoComponent({ form }) {
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<InputNumber min={0} precision={0} />
|
||||
</Form.Item>
|
||||
|
||||
@@ -146,8 +136,7 @@ export default function ShopInfoComponent({ form }) {
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<InputNumber min={0} max={12} precision={0} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
@@ -159,9 +148,8 @@ export default function ShopInfoComponent({ form }) {
|
||||
message: t("general.validation.required"),
|
||||
type: "array",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Select mode="tags" />
|
||||
]}>
|
||||
<Select mode='tags' />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.labels.accountingtiers")}
|
||||
@@ -171,8 +159,7 @@ export default function ShopInfoComponent({ form }) {
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["accountingconfig", "tiers"]}
|
||||
>
|
||||
name={["accountingconfig", "tiers"]}>
|
||||
<Radio.Group>
|
||||
<Radio value={2}>2</Radio>
|
||||
<Radio value={3}>3</Radio>
|
||||
@@ -192,17 +179,15 @@ export default function ShopInfoComponent({ form }) {
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["accountingconfig", "twotierpref"]}
|
||||
>
|
||||
name={["accountingconfig", "twotierpref"]}>
|
||||
<Radio.Group
|
||||
disabled={
|
||||
form.getFieldValue(["accountingconfig", "tiers"]) === 3
|
||||
}
|
||||
>
|
||||
<Radio value="name">
|
||||
}>
|
||||
<Radio value='name'>
|
||||
{t("bodyshop.labels.2tiername")}
|
||||
</Radio>
|
||||
<Radio value="source">
|
||||
<Radio value='source'>
|
||||
{t("bodyshop.labels.2tiersource")}
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
@@ -218,8 +203,7 @@ export default function ShopInfoComponent({ form }) {
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item
|
||||
key={field.key}
|
||||
style={{ padding: 0, margin: 2 }}
|
||||
>
|
||||
style={{ padding: 0, margin: 2 }}>
|
||||
<div style={{ display: "flex" }}>
|
||||
<Form.Item
|
||||
style={{ padding: 0, margin: 2 }}
|
||||
@@ -231,8 +215,7 @@ export default function ShopInfoComponent({ form }) {
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
@@ -245,8 +228,7 @@ export default function ShopInfoComponent({ form }) {
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<DeleteFilled
|
||||
@@ -259,12 +241,11 @@ export default function ShopInfoComponent({ form }) {
|
||||
))}
|
||||
<Form.Item>
|
||||
<Button
|
||||
type="dashed"
|
||||
type='dashed'
|
||||
onClick={() => {
|
||||
add();
|
||||
}}
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
style={{ width: "100%" }}>
|
||||
{t("general.actions.add")}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
@@ -274,35 +255,28 @@ export default function ShopInfoComponent({ form }) {
|
||||
</Form.List>
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel
|
||||
key="roStatus"
|
||||
header={t("bodyshop.labels.jobstatuses")}
|
||||
>
|
||||
key='roStatus'
|
||||
header={t("bodyshop.labels.jobstatuses")}>
|
||||
<ShopInfoROStatusComponent form={form} />
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel
|
||||
key="scheduling"
|
||||
header={t("bodyshop.labels.scheduling")}
|
||||
>
|
||||
key='scheduling'
|
||||
header={t("bodyshop.labels.scheduling")}>
|
||||
<ShopInfoSchedulingComponent form={form} />
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel
|
||||
key="orderStatus"
|
||||
header={t("bodyshop.labels.orderstatuses")}
|
||||
>
|
||||
key='orderStatus'
|
||||
header={t("bodyshop.labels.orderstatuses")}>
|
||||
<ShopInfoOrderStatusComponent form={form} />
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel
|
||||
key="responsibilityCenters"
|
||||
header={t("bodyshop.labels.responsibilitycenters.title")}
|
||||
>
|
||||
key='responsibilityCenters'
|
||||
header={t("bodyshop.labels.responsibilitycenters.title")}>
|
||||
<ShopInfoResponsibilityCenterComponent form={form} />
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel
|
||||
key="intake"
|
||||
header={t("bodyshop.labels.intake")}
|
||||
>
|
||||
<ShopInfoIntakeChecklistComponent form={form} />
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel key='intake' header={t("bodyshop.labels.intake")}>
|
||||
<ShopInfoIntakeChecklistComponent form={form} />
|
||||
</Collapse.Panel>
|
||||
</Collapse>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -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 <AlertComponent message={error.message} type="error" />;
|
||||
if (error) return <AlertComponent message={error.message} type='error' />;
|
||||
if (loading) return <LoadingSpinner />;
|
||||
return (
|
||||
<Form
|
||||
@@ -46,9 +48,8 @@ export default function ShopInfoContainer() {
|
||||
layout='vertical'
|
||||
autoComplete='new-password'
|
||||
onFinish={handleFinish}
|
||||
initialValues={data ? data.bodyshops[0] : null}
|
||||
>
|
||||
<ShopInfoComponent form={form} />
|
||||
initialValues={data ? data.bodyshops[0] : null}>
|
||||
<ShopInfoComponent form={form} saveLoading={saveLoading} />
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -33,8 +33,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item
|
||||
key={field.key}
|
||||
style={{ padding: 0, margin: 2 }}
|
||||
>
|
||||
style={{ padding: 0, margin: 2 }}>
|
||||
<div style={{ display: "flex" }}>
|
||||
<Form.Item
|
||||
style={{ padding: 0, margin: 2 }}
|
||||
@@ -46,8 +45,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<Input onBlur={handleBlur} />
|
||||
</Form.Item>
|
||||
<DeleteFilled
|
||||
@@ -60,12 +58,11 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
))}
|
||||
<Form.Item>
|
||||
<Button
|
||||
type="dashed"
|
||||
type='dashed'
|
||||
onClick={() => {
|
||||
add();
|
||||
}}
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
style={{ width: "100%" }}>
|
||||
{t("bodyshop.actions.newstatus")}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
@@ -85,9 +82,8 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required"),
|
||||
type: "array",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Select mode="multiple">
|
||||
]}>
|
||||
<Select mode='multiple'>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx} value={item}>
|
||||
{item}
|
||||
@@ -104,9 +100,8 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required"),
|
||||
type: "array",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Select mode="multiple">
|
||||
]}>
|
||||
<Select mode='multiple'>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx} value={item}>
|
||||
{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"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -138,8 +132,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["md_ro_statuses", "default_arrived"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_arrived"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -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"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -170,8 +162,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["md_ro_statuses", "default_imported"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_imported"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -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"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -202,8 +192,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["md_ro_statuses", "default_completed"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_completed"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -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"]}>
|
||||
<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>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
|
||||
@@ -40,9 +40,9 @@ try {
|
||||
messaging = firebase.messaging();
|
||||
// Project Settings => Cloud Messaging => Web Push certificates
|
||||
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 {
|
||||
console.log("**********[FCM UTIL] Firebase Messaging is likely unsupported.");
|
||||
console.log("[FCM UTIL] Firebase Messaging is likely unsupported.");
|
||||
}
|
||||
|
||||
export { messaging };
|
||||
@@ -63,7 +63,7 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
||||
|
||||
if (messaging) {
|
||||
messaging.onMessage(async (payload) => {
|
||||
console.log("**********UTILS Message received. ", payload);
|
||||
console.log("[FCM] UTILS Message received. ", payload);
|
||||
navigator.serviceWorker.getRegistration().then((registration) => {
|
||||
return registration.showNotification(
|
||||
"[UTIL]" + payload.notification.title,
|
||||
@@ -97,7 +97,7 @@ if (messaging) {
|
||||
messaging
|
||||
.getToken()
|
||||
.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
|
||||
// app server.
|
||||
// setTokenSentToServer(false);
|
||||
@@ -109,7 +109,7 @@ if (messaging) {
|
||||
// [END_EXCLUDE]
|
||||
})
|
||||
.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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
"default_received": "Default Received Status",
|
||||
"default_returned": "Default Returned",
|
||||
"default_scheduled": "Default Scheduled Status",
|
||||
"default_void": "Default Void",
|
||||
"open_statuses": "Open Statuses",
|
||||
"production_statuses": "Production Statuses"
|
||||
},
|
||||
@@ -171,6 +172,7 @@
|
||||
"alljobstatuses": "All Job Statuses",
|
||||
"allopenjobstatuses": "All Open Job Statuses",
|
||||
"customtemplates": "Custom Templates",
|
||||
"intake": "Job Intake",
|
||||
"jobstatuses": "Job Statuses",
|
||||
"notemplatesavailable": "No templates available to add.",
|
||||
"orderstatuses": "Order Statuses",
|
||||
@@ -786,7 +788,6 @@
|
||||
"hrs_claimed": "Hours Claimed",
|
||||
"hrs_total": "Hours Total",
|
||||
"inproduction": "In Production",
|
||||
"intake": "Job Intake",
|
||||
"job": "Job Details",
|
||||
"jobcosting": "Job Costing",
|
||||
"laborallocations": "Labor Allocations",
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
"default_received": "",
|
||||
"default_returned": "",
|
||||
"default_scheduled": "",
|
||||
"default_void": "",
|
||||
"open_statuses": "",
|
||||
"production_statuses": ""
|
||||
},
|
||||
@@ -171,6 +172,7 @@
|
||||
"alljobstatuses": "",
|
||||
"allopenjobstatuses": "",
|
||||
"customtemplates": "",
|
||||
"intake": "",
|
||||
"jobstatuses": "",
|
||||
"notemplatesavailable": "",
|
||||
"orderstatuses": "",
|
||||
@@ -786,7 +788,6 @@
|
||||
"hrs_claimed": "",
|
||||
"hrs_total": "",
|
||||
"inproduction": "",
|
||||
"intake": "",
|
||||
"job": "",
|
||||
"jobcosting": "",
|
||||
"laborallocations": "",
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
"default_received": "",
|
||||
"default_returned": "",
|
||||
"default_scheduled": "",
|
||||
"default_void": "",
|
||||
"open_statuses": "",
|
||||
"production_statuses": ""
|
||||
},
|
||||
@@ -171,6 +172,7 @@
|
||||
"alljobstatuses": "",
|
||||
"allopenjobstatuses": "",
|
||||
"customtemplates": "",
|
||||
"intake": "",
|
||||
"jobstatuses": "",
|
||||
"notemplatesavailable": "",
|
||||
"orderstatuses": "",
|
||||
@@ -786,7 +788,6 @@
|
||||
"hrs_claimed": "",
|
||||
"hrs_total": "",
|
||||
"inproduction": "",
|
||||
"intake": "",
|
||||
"job": "",
|
||||
"jobcosting": "",
|
||||
"laborallocations": "",
|
||||
|
||||
Reference in New Issue
Block a user