Compare commits
32 Commits
feature/IO
...
master-AIO
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4043bd3d33 | ||
|
|
c1c0b35c8f | ||
|
|
4fd2f034a3 | ||
|
|
aa3b303fe9 | ||
|
|
bd25245290 | ||
|
|
468ed23f73 | ||
|
|
6472b053ed | ||
|
|
322ebd3bc7 | ||
|
|
169070594c | ||
|
|
0f800c5a4c | ||
|
|
0974e69a50 | ||
|
|
345a470731 | ||
|
|
ebde2f1581 | ||
|
|
a45808eb94 | ||
|
|
a2389b1f26 | ||
|
|
ab606a4266 | ||
|
|
da317704c4 | ||
|
|
771573409f | ||
|
|
cb9ccb7e77 | ||
|
|
a5d00d562c | ||
|
|
bdeeea0406 | ||
|
|
297d8afa8a | ||
|
|
3a12597c45 | ||
|
|
72c96f14eb | ||
|
|
de9d47272c | ||
|
|
3fd51f0140 | ||
|
|
84ec68f142 | ||
|
|
22af37e8f1 | ||
|
|
86affddc24 | ||
|
|
57fdffff09 | ||
|
|
281e50a43e | ||
|
|
237c575bab |
@@ -1,6 +1,6 @@
|
||||
import { useSplitClient } from "@splitsoftware/splitio-react";
|
||||
import { Button, Result } from "antd";
|
||||
import LogRocket from "logrocket";
|
||||
//import LogRocket from "logrocket";
|
||||
import { lazy, Suspense, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -101,13 +101,13 @@ export function App({
|
||||
client.setAttribute("imexshopid", bodyshop.imexshopid);
|
||||
|
||||
if (client.getTreatment("LogRocket_Tracking") === "on") {
|
||||
console.log("LR Start");
|
||||
LogRocket.init(
|
||||
InstanceRenderMgr({
|
||||
imex: "gvfvfw/bodyshopapp",
|
||||
rome: "rome-online/rome-online"
|
||||
})
|
||||
);
|
||||
// console.log("LR Start");
|
||||
// LogRocket.init(
|
||||
// InstanceRenderMgr({
|
||||
// imex: "gvfvfw/bodyshopapp",
|
||||
// rome: "rome-online/rome-online"
|
||||
// })
|
||||
// );
|
||||
}
|
||||
}
|
||||
}, [bodyshop, client, currentUser.authorized]);
|
||||
|
||||
@@ -435,9 +435,9 @@ export function BillEnterModalLinesComponent({
|
||||
rules: [{ required: true }]
|
||||
}),
|
||||
formInput: () => (
|
||||
<Select
|
||||
showSearch
|
||||
style={{ minWidth: "3rem" }}
|
||||
<Select
|
||||
showSearch
|
||||
style={{ minWidth: "3rem" }}
|
||||
disabled={disabled}
|
||||
tabIndex={0}
|
||||
options={
|
||||
@@ -461,7 +461,7 @@ export function BillEnterModalLinesComponent({
|
||||
name: [field.name, "location"]
|
||||
}),
|
||||
formInput: () => (
|
||||
<Select
|
||||
<Select
|
||||
disabled={disabled}
|
||||
tabIndex={0}
|
||||
options={bodyshop.md_parts_locations.map((loc) => ({ value: loc, label: loc }))}
|
||||
@@ -495,7 +495,9 @@ export function BillEnterModalLinesComponent({
|
||||
{Enhanced_Payroll.treatment === "on" ? (
|
||||
<Space>
|
||||
{t("joblines.fields.assigned_team", { name: employeeTeamName?.name })}
|
||||
{`${jobline.mod_lb_hrs} units/${t(`joblines.fields.lbr_types.${jobline.mod_lbr_ty}`)}`}
|
||||
{jobline
|
||||
? `${jobline.mod_lb_hrs} units/${t(`joblines.fields.lbr_types.${jobline.mod_lbr_ty}`)}`
|
||||
: null}
|
||||
</Space>
|
||||
) : null}
|
||||
|
||||
@@ -506,10 +508,7 @@ export function BillEnterModalLinesComponent({
|
||||
rules={[{ required: true }]}
|
||||
name={[record.name, "lbr_adjustment", "mod_lbr_ty"]}
|
||||
>
|
||||
<Select
|
||||
allowClear
|
||||
options={CiecaSelect(false, true)}
|
||||
/>
|
||||
<Select allowClear options={CiecaSelect(false, true)} />
|
||||
</Form.Item>
|
||||
|
||||
{Enhanced_Payroll.treatment === "on" ? (
|
||||
|
||||
@@ -67,22 +67,25 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow grow>
|
||||
<Form.Item label={t("joblines.fields.mod_lbr_ty")} name="mod_lbr_ty">
|
||||
<Select allowClear options={[
|
||||
{ value: "LAA", label: t("joblines.fields.lbr_types.LAA") },
|
||||
{ value: "LAB", label: t("joblines.fields.lbr_types.LAB") },
|
||||
{ value: "LAD", label: t("joblines.fields.lbr_types.LAD") },
|
||||
{ value: "LAE", label: t("joblines.fields.lbr_types.LAE") },
|
||||
{ value: "LAF", label: t("joblines.fields.lbr_types.LAF") },
|
||||
{ value: "LAG", label: t("joblines.fields.lbr_types.LAG") },
|
||||
{ value: "LAM", label: t("joblines.fields.lbr_types.LAM") },
|
||||
{ value: "LAR", label: t("joblines.fields.lbr_types.LAR") },
|
||||
{ value: "LAS", label: t("joblines.fields.lbr_types.LAS") },
|
||||
{ value: "LAU", label: t("joblines.fields.lbr_types.LAU") },
|
||||
{ value: "LA1", label: t("joblines.fields.lbr_types.LA1") },
|
||||
{ value: "LA2", label: t("joblines.fields.lbr_types.LA2") },
|
||||
{ value: "LA3", label: t("joblines.fields.lbr_types.LA3") },
|
||||
{ value: "LA4", label: t("joblines.fields.lbr_types.LA4") }
|
||||
]} />
|
||||
<Select
|
||||
allowClear
|
||||
options={[
|
||||
{ value: "LAA", label: t("joblines.fields.lbr_types.LAA") },
|
||||
{ value: "LAB", label: t("joblines.fields.lbr_types.LAB") },
|
||||
{ value: "LAD", label: t("joblines.fields.lbr_types.LAD") },
|
||||
{ value: "LAE", label: t("joblines.fields.lbr_types.LAE") },
|
||||
{ value: "LAF", label: t("joblines.fields.lbr_types.LAF") },
|
||||
{ value: "LAG", label: t("joblines.fields.lbr_types.LAG") },
|
||||
{ value: "LAM", label: t("joblines.fields.lbr_types.LAM") },
|
||||
{ value: "LAR", label: t("joblines.fields.lbr_types.LAR") },
|
||||
{ value: "LAS", label: t("joblines.fields.lbr_types.LAS") },
|
||||
{ value: "LAU", label: t("joblines.fields.lbr_types.LAU") },
|
||||
{ value: "LA1", label: t("joblines.fields.lbr_types.LA1") },
|
||||
{ value: "LA2", label: t("joblines.fields.lbr_types.LA2") },
|
||||
{ value: "LA3", label: t("joblines.fields.lbr_types.LA3") },
|
||||
{ value: "LA4", label: t("joblines.fields.lbr_types.LA4") }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.op_code_desc")} name="op_code_desc">
|
||||
<Input />
|
||||
@@ -128,21 +131,27 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow>
|
||||
<Form.Item label={t("joblines.fields.part_type")} name="part_type">
|
||||
<Select allowClear options={[
|
||||
{ value: "PAA", label: t("joblines.fields.part_types.PAA") },
|
||||
{ value: "PAC", label: t("joblines.fields.part_types.PAC") },
|
||||
{ value: "PAE", label: t("joblines.fields.part_types.PAE") },
|
||||
{ value: "PAL", label: t("joblines.fields.part_types.PAL") },
|
||||
{ value: "PAM", label: t("joblines.fields.part_types.PAM") },
|
||||
{ value: "PAN", label: t("joblines.fields.part_types.PAN") },
|
||||
{ value: "PAO", label: t("joblines.fields.part_types.PAO") },
|
||||
{ value: "PAR", label: t("joblines.fields.part_types.PAR") },
|
||||
{ value: "PAS", label: t("joblines.fields.part_types.PAS") }
|
||||
]} />
|
||||
<Select
|
||||
allowClear
|
||||
options={[
|
||||
{ value: "PAA", label: t("joblines.fields.part_types.PAA") },
|
||||
{ value: "PAC", label: t("joblines.fields.part_types.PAC") },
|
||||
{ value: "PAE", label: t("joblines.fields.part_types.PAE") },
|
||||
{ value: "PAL", label: t("joblines.fields.part_types.PAL") },
|
||||
{ value: "PAM", label: t("joblines.fields.part_types.PAM") },
|
||||
{ value: "PAN", label: t("joblines.fields.part_types.PAN") },
|
||||
{ value: "PAO", label: t("joblines.fields.part_types.PAO") },
|
||||
{ value: "PAR", label: t("joblines.fields.part_types.PAR") },
|
||||
{ value: "PAS", label: t("joblines.fields.part_types.PAS") }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.oem_partno")} name="oem_partno">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.alt_partno")} name="alt_partno">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("joblines.fields.part_qty")}
|
||||
name="part_qty"
|
||||
|
||||
@@ -80,14 +80,14 @@ const ModelInfoToolTip = ({ metadata, cardSettings }) =>
|
||||
<Col span={24}>
|
||||
<EllipsesToolTip
|
||||
title={
|
||||
metadata.v_model_yr || metadata.v_make_desc || metadata.v_model_desc
|
||||
? `${metadata.v_model_yr || ""} ${metadata.v_make_desc || ""} ${metadata.v_model_desc || ""}`
|
||||
metadata.v_model_yr || metadata.v_make_desc || metadata.v_model_desc || metadata.v_color
|
||||
? `${metadata.v_model_yr || ""} ${metadata.v_color || ""} ${metadata.v_make_desc || ""} ${metadata.v_model_desc || ""}`
|
||||
: null
|
||||
}
|
||||
kiosk={cardSettings.kiosk}
|
||||
>
|
||||
{metadata.v_model_yr || metadata.v_make_desc || metadata.v_model_desc ? (
|
||||
`${metadata.v_model_yr || ""} ${metadata.v_make_desc || ""} ${metadata.v_model_desc || ""}`
|
||||
{metadata.v_model_yr || metadata.v_make_desc || metadata.v_model_desc || metadata.v_color ? (
|
||||
`${metadata.v_model_yr || ""} ${metadata.v_color || ""} ${metadata.v_make_desc || ""} ${metadata.v_model_desc || ""}`
|
||||
) : (
|
||||
<span> </span>
|
||||
)}
|
||||
|
||||
@@ -140,13 +140,11 @@ const productionListColumnsData = ({ technician, state, activeStatuses, data, bo
|
||||
sortOrder: state.sortedInfo.columnKey === "vehicle" && state.sortedInfo.order,
|
||||
render: (text, record) =>
|
||||
technician ? (
|
||||
<>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${record.v_model_desc || ""} ${
|
||||
record.v_color || ""
|
||||
} ${record.plate_no || ""}`}</>
|
||||
<>{`${record.v_model_yr || ""} ${record.v_color || ""}${record.v_make_desc || ""} ${record.v_model_desc || ""} ${record.plate_no || ""}`}</>
|
||||
) : (
|
||||
<Link to={`/manage/vehicles/${record.vehicleid}`}>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||
record.v_model_desc || ""
|
||||
} ${record.v_color || ""} ${record.plate_no || ""}`}</Link>
|
||||
<Link
|
||||
to={`/manage/vehicles/${record.vehicleid}`}
|
||||
>{`${record.v_model_yr || ""} ${record.v_color || ""} ${record.v_make_desc || ""} ${record.v_model_desc || ""} ${record.plate_no || ""}`}</Link>
|
||||
)
|
||||
},
|
||||
{
|
||||
@@ -621,7 +619,7 @@ const productionListColumnsData = ({ technician, state, activeStatuses, data, bo
|
||||
sortOrder: state.sortedInfo.columnKey === "dms_id" && state.sortedInfo.order
|
||||
}
|
||||
]
|
||||
: []),
|
||||
: [])
|
||||
];
|
||||
};
|
||||
export default productionListColumnsData;
|
||||
|
||||
@@ -48,7 +48,7 @@ export function ScheduleVerifyIntegrity({ currentUser }) {
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
if (currentUser.email === "patrick@imex.prod")
|
||||
if (currentUser.email === "allan@imex.prod" || currentUser.email === "dave@imex.prod")
|
||||
return (
|
||||
<Button loading={loading} onClick={handleVerify}>
|
||||
Developer Use Only - Verify Schedule Integrity
|
||||
|
||||
@@ -157,36 +157,36 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
</Col>
|
||||
{HasFeatureAccess({ featureName: "export", bodyshop }) &&
|
||||
ClosingPeriod.treatment === "on" && (
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item
|
||||
key="ClosingPeriod"
|
||||
name={["accountingconfig", "ClosingPeriod"]}
|
||||
label={t("bodyshop.fields.closingperiod")}
|
||||
>
|
||||
<DatePicker.RangePicker format="MM/DD/YYYY" presets={DatePickerRanges} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item
|
||||
key="ClosingPeriod"
|
||||
name={["accountingconfig", "ClosingPeriod"]}
|
||||
label={t("bodyshop.fields.closingperiod")}
|
||||
>
|
||||
<DatePicker.RangePicker format="MM/DD/YYYY" presets={DatePickerRanges} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
{HasFeatureAccess({ featureName: "export", bodyshop }) &&
|
||||
ADPPayroll.treatment === "on" && (
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item
|
||||
key="companyCode"
|
||||
name={["accountingconfig", "companyCode"]}
|
||||
label={t("bodyshop.fields.companycode")}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item
|
||||
key="companyCode"
|
||||
name={["accountingconfig", "companyCode"]}
|
||||
label={t("bodyshop.fields.companycode")}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
{HasFeatureAccess({ featureName: "export", bodyshop }) &&
|
||||
ADPPayroll.treatment === "on" && (
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item key="batchID" name={["accountingconfig", "batchID"]} label={t("bodyshop.fields.batchid")}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
{HasFeatureAccess({ featureName: "export", bodyshop }) && !hasDMSKey && (
|
||||
<>
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
@@ -512,6 +512,15 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<InputNumber min={0} max={100} suffix="%" />
|
||||
</Form.Item>
|
||||
{bodyshop.cdk_dealerid && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.disablecontact")}
|
||||
valuePropName="checked"
|
||||
name={["cdk_configuration", "disablecontact"]}
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
)}
|
||||
{bodyshop.pbs_serialnumber && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.disablecontactvehiclecreation")}
|
||||
|
||||
@@ -44,9 +44,7 @@ export default function VehiclesListComponent({ loading, vehicles, total, refetc
|
||||
key: "description",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<span>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||
record.v_model_desc || ""
|
||||
} ${record.v_color || ""}`}</span>
|
||||
<span>{`${record.v_model_yr || ""} ${record.v_color || ""} ${record.v_make_desc || ""} ${record.v_model_desc || ""} `}</span>
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -111,7 +109,13 @@ export default function VehiclesListComponent({ loading, vehicles, total, refetc
|
||||
>
|
||||
<ResponsiveTable
|
||||
loading={loading}
|
||||
pagination={{ placement: "top", pageSize: currentPageSize, current: currentPage, showSizeChanger: true, total: total }}
|
||||
pagination={{
|
||||
placement: "top",
|
||||
pageSize: currentPageSize,
|
||||
current: currentPage,
|
||||
showSizeChanger: true,
|
||||
total: total
|
||||
}}
|
||||
columns={columns}
|
||||
mobileColumnKeys={["v_vin", "description", "plate_no"]}
|
||||
rowKey="id"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { getAnalytics, logEvent } from "@firebase/analytics";
|
||||
//import { getAnalytics, logEvent } from "@firebase/analytics";
|
||||
import { initializeApp } from "@firebase/app";
|
||||
import { getAuth, updatePassword, updateProfile } from "@firebase/auth";
|
||||
import { getFirestore } from "@firebase/firestore";
|
||||
import { getMessaging, getToken, onMessage } from "@firebase/messaging";
|
||||
import { store } from "../redux/store";
|
||||
//import { store } from "../redux/store";
|
||||
//import * as amplitude from '@amplitude/analytics-browser';
|
||||
// import posthog from 'posthog-js'
|
||||
|
||||
@@ -12,7 +12,7 @@ initializeApp(config);
|
||||
|
||||
export const auth = getAuth();
|
||||
export const firestore = getFirestore();
|
||||
export const analytics = getAnalytics();
|
||||
//export const analytics = getAnalytics();
|
||||
|
||||
//export default firebase;
|
||||
export const getCurrentUser = () => {
|
||||
@@ -72,34 +72,36 @@ onMessage(messaging, (payload) => {
|
||||
// ...
|
||||
});
|
||||
|
||||
export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
||||
try {
|
||||
const state = stateProp || store.getState();
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
export const logImEXEvent = (eventName, additionalParams, _stateProp = null) => {
|
||||
// Disabled as a part of IO-3712.
|
||||
// try {
|
||||
// const state = stateProp || store.getState();
|
||||
|
||||
const eventParams = {
|
||||
shop: (state.user && state.user.bodyshop && state.user.bodyshop.shopname) || null,
|
||||
user: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||
partsManagementOnly: state?.user?.partsManagementOnly,
|
||||
...additionalParams
|
||||
};
|
||||
// axios.post("/ioevent", {
|
||||
// useremail: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||
// bodyshopid: (state.user && state.user.bodyshop && state.user.bodyshop.id) || null,
|
||||
// operationName: eventName,
|
||||
// variables: additionalParams,
|
||||
// dbevent: false,
|
||||
// env: `master-AIO|${import.meta.env.VITE_APP_GIT_SHA_DATE}`
|
||||
// });
|
||||
// console.log(
|
||||
// "%c[Analytics]",
|
||||
// "background-color: green ;font-weight:bold;",
|
||||
// eventName,
|
||||
// eventParams
|
||||
// );
|
||||
logEvent(analytics, eventName, eventParams);
|
||||
//amplitude.track(eventName, eventParams);
|
||||
//posthog.capture(eventName, eventParams);
|
||||
} finally {
|
||||
//If it fails, just keep going.
|
||||
}
|
||||
// const eventParams = {
|
||||
// shop: (state.user && state.user.bodyshop && state.user.bodyshop.shopname) || null,
|
||||
// user: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||
// partsManagementOnly: state?.user?.partsManagementOnly,
|
||||
// ...additionalParams
|
||||
// };
|
||||
// // axios.post("/ioevent", {
|
||||
// // useremail: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||
// // bodyshopid: (state.user && state.user.bodyshop && state.user.bodyshop.id) || null,
|
||||
// // operationName: eventName,
|
||||
// // variables: additionalParams,
|
||||
// // dbevent: false,
|
||||
// // env: `master-AIO|${import.meta.env.VITE_APP_GIT_SHA_DATE}`
|
||||
// // });
|
||||
// // console.log(
|
||||
// // "%c[Analytics]",
|
||||
// // "background-color: green ;font-weight:bold;",
|
||||
// // eventName,
|
||||
// // eventParams
|
||||
// // );
|
||||
// logEvent(analytics, eventName, eventParams);
|
||||
// //amplitude.track(eventName, eventParams);
|
||||
// //posthog.capture(eventName, eventParams);
|
||||
// } finally {
|
||||
// //If it fails, just keep going.
|
||||
// }
|
||||
};
|
||||
|
||||
@@ -14,8 +14,8 @@ import reportWebVitals from "./reportWebVitals";
|
||||
import "./translations/i18n";
|
||||
import "./utils/CleanAxios";
|
||||
// import * as amplitude from "@amplitude/analytics-browser";
|
||||
import { PostHogProvider } from "posthog-js/react";
|
||||
import posthog from "posthog-js";
|
||||
//import { PostHogProvider } from "posthog-js/react";
|
||||
//import posthog from "posthog-js";
|
||||
import { StrictMode } from "react";
|
||||
|
||||
window.global ||= window;
|
||||
@@ -44,11 +44,11 @@ Dinero.globalRoundingMode = "HALF_EVEN";
|
||||
// // }
|
||||
// });
|
||||
|
||||
posthog.init(import.meta.env.VITE_PUBLIC_POSTHOG_KEY, {
|
||||
autocapture: false,
|
||||
capture_exceptions: true,
|
||||
api_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST
|
||||
});
|
||||
// posthog.init(import.meta.env.VITE_PUBLIC_POSTHOG_KEY, {
|
||||
// autocapture: false,
|
||||
// capture_exceptions: true,
|
||||
// api_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST
|
||||
// });
|
||||
|
||||
const sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouterV6(createBrowserRouter);
|
||||
|
||||
@@ -70,9 +70,7 @@ function App() {
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<PersistGate loading={<LoadingSpinner message="Restoring your settings..." />} persistor={persistor}>
|
||||
<PostHogProvider client={posthog}>
|
||||
<RouterProvider router={router} />
|
||||
</PostHogProvider>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import FingerprintJS from "@fingerprintjs/fingerprintjs";
|
||||
import { setUserId, setUserProperties } from "@firebase/analytics";
|
||||
//import { setUserId, setUserProperties } from "@firebase/analytics";
|
||||
import {
|
||||
checkActionCode,
|
||||
confirmPasswordReset,
|
||||
@@ -9,14 +9,13 @@ import {
|
||||
} from "@firebase/auth";
|
||||
import { arrayUnion, doc, getDoc, setDoc, updateDoc } from "@firebase/firestore";
|
||||
import { getToken } from "@firebase/messaging";
|
||||
import * as Sentry from "@sentry/react";
|
||||
// import * as Sentry from "@sentry/react";
|
||||
import { notification } from "antd";
|
||||
import axios from "axios";
|
||||
import i18next from "i18next";
|
||||
import LogRocket from "logrocket";
|
||||
//import LogRocket from "logrocket";
|
||||
import { all, call, delay, put, select, takeLatest } from "redux-saga/effects";
|
||||
import {
|
||||
analytics,
|
||||
auth,
|
||||
firestore,
|
||||
getCurrentUser,
|
||||
@@ -49,7 +48,7 @@ import {
|
||||
validatePasswordResetSuccess
|
||||
} from "./user.actions";
|
||||
import UserActionTypes from "./user.types";
|
||||
import posthog from "posthog-js";
|
||||
//import posthog from "posthog-js";
|
||||
import { bodyshopHasDmsKey, determineDMSTypeByBodyshop, DMS_MAP } from "../../utils/dmsUtils";
|
||||
|
||||
const fpPromise = FingerprintJS.load();
|
||||
@@ -91,9 +90,9 @@ export function* isUserAuthenticated() {
|
||||
return;
|
||||
}
|
||||
|
||||
LogRocket.identify(user.email);
|
||||
//LogRocket.identify(user.email);
|
||||
//amplitude.setUserId(user.email);
|
||||
posthog.identify(user.email);
|
||||
//posthog.identify(user.email);
|
||||
|
||||
const eulaQuery = yield client.query({
|
||||
query: QUERY_EULA,
|
||||
@@ -234,7 +233,7 @@ export function* onSignInSuccess() {
|
||||
}
|
||||
|
||||
export function* signInSuccessSaga({ payload }) {
|
||||
LogRocket.identify(payload.email);
|
||||
//LogRocket.identify(payload.email);
|
||||
|
||||
try {
|
||||
window.$crisp?.push(["set", "user:nickname", [payload.displayName || payload.email]]);
|
||||
@@ -279,17 +278,17 @@ export function* signInSuccessSaga({ payload }) {
|
||||
console.log("Error updating Crisp settings.", error);
|
||||
}
|
||||
|
||||
try {
|
||||
Sentry.setUser({
|
||||
email: payload.email,
|
||||
username: payload.displayName || payload.email
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("Error setting Sentry user.", error);
|
||||
}
|
||||
// try {
|
||||
// Sentry.setUser({
|
||||
// email: payload.email,
|
||||
// username: payload.displayName || payload.email
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.log("Error setting Sentry user.", error);
|
||||
// }
|
||||
|
||||
setUserId(analytics, payload.email);
|
||||
setUserProperties(analytics, payload);
|
||||
// setUserId(analytics, payload.email);
|
||||
// setUserProperties(analytics, payload);
|
||||
yield;
|
||||
}
|
||||
|
||||
|
||||
@@ -370,6 +370,7 @@
|
||||
"cashierid": "Cashier ID",
|
||||
"default_journal": "Default Journal",
|
||||
"disablebillwip": "Disable bill WIP for A/P Posting",
|
||||
"disablecontact": "Disable Contact Updates/Creation",
|
||||
"disablecontactvehiclecreation": "Disable Contact & Vehicle Updates/Creation",
|
||||
"dms_acctnumber": "DMS Account #",
|
||||
"dms_control_override": "Static Control # Override",
|
||||
|
||||
@@ -370,6 +370,7 @@
|
||||
"cashierid": "",
|
||||
"default_journal": "",
|
||||
"disablebillwip": "",
|
||||
"disablecontact": "",
|
||||
"disablecontactvehiclecreation": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_control_override": "",
|
||||
|
||||
@@ -370,6 +370,7 @@
|
||||
"cashierid": "",
|
||||
"default_journal": "",
|
||||
"disablebillwip": "",
|
||||
"disablecontact": "",
|
||||
"disablecontactvehiclecreation": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_control_override": "",
|
||||
|
||||
@@ -1,73 +1,71 @@
|
||||
const { isString } = require("lodash");
|
||||
const { sendServerEmail } = require("../email/sendemail");
|
||||
const logger = require("../utils/logger");
|
||||
const { raw } = require("express");
|
||||
|
||||
const SUPPORT_EMAIL = "patrick@imexsystems.ca";
|
||||
const SUPPORT_EMAIL = "support@imexsystems.ca";
|
||||
|
||||
const safeJsonParse = (maybeJson) => {
|
||||
if (!isString(maybeJson)) return null;
|
||||
try {
|
||||
return JSON.parse(maybeJson);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
if (!isString(maybeJson)) return null;
|
||||
try {
|
||||
return JSON.parse(maybeJson);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const handleBillAiFeedback = async (req, res) => {
|
||||
try {
|
||||
const rating = req.body?.rating;
|
||||
const comments = isString(req.body?.comments) ? req.body?.comments?.trim() : "";
|
||||
try {
|
||||
const rating = req.body?.rating;
|
||||
const comments = isString(req.body?.comments) ? req.body?.comments?.trim() : "";
|
||||
|
||||
const billFormValues = safeJsonParse(req.body?.billFormValues);
|
||||
const rawAIData = safeJsonParse(req.body?.rawAIData);
|
||||
const billFormValues = safeJsonParse(req.body?.billFormValues);
|
||||
const rawAIData = safeJsonParse(req.body?.rawAIData);
|
||||
|
||||
const jobid = billFormValues?.jobid || billFormValues?.jobId || "unknown";
|
||||
const shopname = req.body?.shopname || "unknown";
|
||||
const subject = `Bill AI Feedback (${rating === "up" ? "+" : "-"}) Shop=${shopname} jobid=${jobid}`;
|
||||
const jobid = billFormValues?.jobid || billFormValues?.jobId || "unknown";
|
||||
const shopname = req.body?.shopname || "unknown";
|
||||
const subject = `Bill AI Feedback (${rating === "up" ? "+" : "-"}) Shop=${shopname} jobid=${jobid}`;
|
||||
|
||||
const text = [
|
||||
`User: ${req?.user?.email || "unknown"}`,
|
||||
`Rating: ${rating}`,
|
||||
comments ? `Comments: ${comments}` : "Comments: (none)",
|
||||
"",
|
||||
"Form Values (User):",
|
||||
JSON.stringify(billFormValues, null, 4),
|
||||
"",
|
||||
"Raw AI Data:",
|
||||
JSON.stringify(rawAIData, null, 4)
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
const text = [
|
||||
`User: ${req?.user?.email || "unknown"}`,
|
||||
`Rating: ${rating}`,
|
||||
comments ? `Comments: ${comments}` : "Comments: (none)",
|
||||
"",
|
||||
"Form Values (User):",
|
||||
JSON.stringify(billFormValues, null, 4),
|
||||
"",
|
||||
"Raw AI Data:",
|
||||
JSON.stringify(rawAIData, null, 4)
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
|
||||
const attachments = [];
|
||||
if (req.file?.buffer) {
|
||||
attachments.push({
|
||||
filename: req.file.originalname || `bill-${jobid}.pdf`,
|
||||
content: req.file.buffer,
|
||||
contentType: req.file.mimetype || "application/pdf"
|
||||
});
|
||||
}
|
||||
|
||||
await sendServerEmail({
|
||||
to: [SUPPORT_EMAIL],
|
||||
subject,
|
||||
type: "text",
|
||||
text,
|
||||
attachments
|
||||
});
|
||||
|
||||
return res.json({ success: true });
|
||||
} catch (error) {
|
||||
logger.log("bill-ai-feedback-error", "ERROR", req?.user?.email, null, {
|
||||
message: error?.message,
|
||||
stack: error?.stack
|
||||
});
|
||||
return res.status(500).json({ message: "Failed to submit feedback" });
|
||||
const attachments = [];
|
||||
if (req.file?.buffer) {
|
||||
attachments.push({
|
||||
filename: req.file.originalname || `bill-${jobid}.pdf`,
|
||||
content: req.file.buffer,
|
||||
contentType: req.file.mimetype || "application/pdf"
|
||||
});
|
||||
}
|
||||
|
||||
await sendServerEmail({
|
||||
to: [SUPPORT_EMAIL],
|
||||
subject,
|
||||
type: "text",
|
||||
text,
|
||||
attachments
|
||||
});
|
||||
|
||||
return res.json({ success: true });
|
||||
} catch (error) {
|
||||
logger.log("bill-ai-feedback-error", "ERROR", req?.user?.email, null, {
|
||||
message: error?.message,
|
||||
stack: error?.stack
|
||||
});
|
||||
return res.status(500).json({ message: "Failed to submit feedback" });
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
handleBillAiFeedback
|
||||
handleBillAiFeedback
|
||||
};
|
||||
|
||||
@@ -52,7 +52,6 @@ exports.default = async (req, res) => {
|
||||
emailer
|
||||
.sendTaskEmail({
|
||||
to: [
|
||||
"patrick.fic@convenient-brands.com",
|
||||
"bradley.rhoades@convenient-brands.com",
|
||||
"jrome@rometech.com",
|
||||
"ivana@imexsystems.ca",
|
||||
|
||||
@@ -422,7 +422,6 @@ const emailBounce = async (req, res) => {
|
||||
rome: `Rome Online <noreply@romeonline.io>`
|
||||
}),
|
||||
to: replyTo,
|
||||
//bcc: "patrick@snapt.ca",
|
||||
subject: `${InstanceManager({
|
||||
imex: "ImEX Online",
|
||||
rome: "Rome Online"
|
||||
|
||||
@@ -15,7 +15,7 @@ const _ = require("lodash");
|
||||
const moment = require("moment-timezone");
|
||||
|
||||
const replaceSpecialRegex = /[^a-zA-Z0-9 ]+/g;
|
||||
|
||||
const bypassCustomerId = "bypass";
|
||||
// Helper function to handle FortellisApiError logging
|
||||
function handleFortellisApiError(socket, error, functionName, additionalDetails = {}) {
|
||||
if (error instanceof FortellisApiError) {
|
||||
@@ -95,7 +95,8 @@ async function FortellisJobExport({ socket, redisHelpers, txEnvelope, jobid }) {
|
||||
defaultFortellisTTL
|
||||
);
|
||||
|
||||
let DMSVehCustomer;
|
||||
let DMSVehCustomerFromVehicle;
|
||||
//let DMSVehCustomer;
|
||||
if (!DMSVid.newId) {
|
||||
CreateFortellisLogEvent(socket, "DEBUG", `{2.1} Querying the Vehicle using the DMSVid: ${DMSVid.vehiclesVehId}`);
|
||||
const DMSVeh = await QueryDmsVehicleById({ socket, redisHelpers, JobData, DMSVid });
|
||||
@@ -106,46 +107,66 @@ async function FortellisJobExport({ socket, redisHelpers, txEnvelope, jobid }) {
|
||||
DMSVeh,
|
||||
defaultFortellisTTL
|
||||
);
|
||||
DMSVehCustomerFromVehicle = DMSVeh?.owners && DMSVeh.owners.find((o) => o.id.assigningPartyId === "CURRENT");
|
||||
|
||||
const DMSVehCustomerFromVehicle =
|
||||
DMSVeh?.owners && DMSVeh.owners.find((o) => o.id.assigningPartyId === "CURRENT");
|
||||
// //Add in contact bypass for Fortellis.
|
||||
// if (!JobData.bodyshop.cdk_configuration.disablecontact) {
|
||||
// const DMSVehCustomerFromVehicle =
|
||||
// DMSVeh?.owners && DMSVeh.owners.find((o) => o.id.assigningPartyId === "CURRENT");
|
||||
|
||||
if (DMSVehCustomerFromVehicle?.id && DMSVehCustomerFromVehicle.id.value) {
|
||||
CreateFortellisLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`{2.2} Querying the Customer using the ID from DMSVeh: ${DMSVehCustomerFromVehicle.id.value}`
|
||||
);
|
||||
DMSVehCustomer = await QueryDmsCustomerById({
|
||||
socket,
|
||||
redisHelpers,
|
||||
JobData,
|
||||
CustomerId: DMSVehCustomerFromVehicle.id.value
|
||||
});
|
||||
await setSessionTransactionData(
|
||||
socket.id,
|
||||
getTransactionType(jobid),
|
||||
FortellisCacheEnums.DMSVehCustomer,
|
||||
DMSVehCustomer,
|
||||
defaultFortellisTTL
|
||||
);
|
||||
}
|
||||
// if (DMSVehCustomerFromVehicle?.id && DMSVehCustomerFromVehicle.id.value) {
|
||||
// CreateFortellisLogEvent(
|
||||
// socket,
|
||||
// "DEBUG",
|
||||
// `{2.2} Querying the Customer using the ID from DMSVeh: ${DMSVehCustomerFromVehicle.id.value}`
|
||||
// );
|
||||
// DMSVehCustomer = await QueryDmsCustomerById({
|
||||
// socket,
|
||||
// redisHelpers,
|
||||
// JobData,
|
||||
// CustomerId: DMSVehCustomerFromVehicle.id.value
|
||||
// });
|
||||
// await setSessionTransactionData(
|
||||
// socket.id,
|
||||
// getTransactionType(jobid),
|
||||
// FortellisCacheEnums.DMSVehCustomer,
|
||||
// DMSVehCustomer,
|
||||
// defaultFortellisTTL
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
CreateFortellisLogEvent(socket, "DEBUG", `{2.3} Querying the Customer using the name.`);
|
||||
if (JobData.bodyshop.cdk_configuration.disablecontact) {
|
||||
//Just go straight to posting.
|
||||
await FortellisSelectedCustomer({ socket, redisHelpers, selectedCustomerId: bypassCustomerId, jobid });
|
||||
} else {
|
||||
const DMSCustList = await QueryDmsCustomerByName({ socket, redisHelpers, JobData });
|
||||
await setSessionTransactionData(
|
||||
socket.id,
|
||||
getTransactionType(jobid),
|
||||
FortellisCacheEnums.DMSCustList,
|
||||
DMSCustList,
|
||||
defaultFortellisTTL
|
||||
);
|
||||
|
||||
const DMSCustList = await QueryDmsCustomerByName({ socket, redisHelpers, JobData });
|
||||
await setSessionTransactionData(
|
||||
socket.id,
|
||||
getTransactionType(jobid),
|
||||
FortellisCacheEnums.DMSCustList,
|
||||
DMSCustList,
|
||||
defaultFortellisTTL
|
||||
);
|
||||
|
||||
socket.emit("fortellis-select-customer", [
|
||||
...(DMSVehCustomer ? [{ ...DMSVehCustomer, vinOwner: true }] : []),
|
||||
...DMSCustList
|
||||
]);
|
||||
socket.emit("fortellis-select-customer",
|
||||
//Removed to save one one API call while disputing with fortellis.
|
||||
// [
|
||||
// // ...(DMSVehCustomer ? [{ ...DMSVehCustomer, vinOwner: true }] : []),
|
||||
// ...DMSCustList
|
||||
// ]
|
||||
DMSVehCustomerFromVehicle ?
|
||||
DMSCustList.map(c => {
|
||||
//if customer id is the same as the current assigned owner on the vehicle id, set it as vinowner true. )
|
||||
if (DMSVehCustomerFromVehicle?.id?.value === c.customerId) {
|
||||
return { ...c, vinOwner: true }
|
||||
} else {
|
||||
return c
|
||||
}
|
||||
}) : DMSCustList
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
CreateFortellisLogEvent(socket, "ERROR", `Error in FortellisJobExport - ${error} `, {
|
||||
error: error.message,
|
||||
@@ -218,36 +239,40 @@ async function FortellisSelectedCustomer({ socket, redisHelpers, selectedCustome
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
//Bypass only the customer creation. We still need to create the vehicle and update it to post the service history later on.
|
||||
let DMSCust;
|
||||
if (selectedCustomerId) {
|
||||
CreateFortellisLogEvent(socket, "DEBUG", `{3.1} Querying the Customer using Customer ID: ${selectedCustomerId}`);
|
||||
if (!JobData.bodyshop.cdk_configuration.disablecontact) {
|
||||
if (selectedCustomerId) {
|
||||
CreateFortellisLogEvent(socket, "DEBUG", `{3.1} Querying the Customer using Customer ID: ${selectedCustomerId}`);
|
||||
|
||||
//Get cust list from Redis. Return the item
|
||||
const DMSCustList =
|
||||
(await getSessionTransactionData(socket.id, getTransactionType(jobid), FortellisCacheEnums.DMSCustList)) || [];
|
||||
const existingCustomerInDMSCustList = DMSCustList.find((c) => c.customerId === selectedCustomerId);
|
||||
DMSCust = existingCustomerInDMSCustList || {
|
||||
customerId: selectedCustomerId //This is the fall back in case it is the generic customer.
|
||||
};
|
||||
await setSessionTransactionData(
|
||||
socket.id,
|
||||
getTransactionType(jobid),
|
||||
FortellisCacheEnums.DMSCust,
|
||||
DMSCust,
|
||||
defaultFortellisTTL
|
||||
);
|
||||
} else {
|
||||
CreateFortellisLogEvent(socket, "DEBUG", `{3.2} Creating new customer.`);
|
||||
const DMSCustomerInsertResponse = await InsertDmsCustomer({ socket, redisHelpers, JobData });
|
||||
DMSCust = { customerId: DMSCustomerInsertResponse.data };
|
||||
await setSessionTransactionData(
|
||||
socket.id,
|
||||
getTransactionType(jobid),
|
||||
FortellisCacheEnums.DMSCust,
|
||||
DMSCust,
|
||||
defaultFortellisTTL
|
||||
);
|
||||
//Get cust list from Redis. Return the item
|
||||
const DMSCustList =
|
||||
(await getSessionTransactionData(socket.id, getTransactionType(jobid), FortellisCacheEnums.DMSCustList)) || [];
|
||||
const existingCustomerInDMSCustList = DMSCustList.find((c) => c.customerId === selectedCustomerId);
|
||||
DMSCust = existingCustomerInDMSCustList || {
|
||||
customerId: selectedCustomerId //This is the fall back in case it is the generic customer.
|
||||
};
|
||||
await setSessionTransactionData(
|
||||
socket.id,
|
||||
getTransactionType(jobid),
|
||||
FortellisCacheEnums.DMSCust,
|
||||
DMSCust,
|
||||
defaultFortellisTTL
|
||||
);
|
||||
} else {
|
||||
CreateFortellisLogEvent(socket, "DEBUG", `{3.2} Creating new customer.`);
|
||||
const DMSCustomerInsertResponse = await InsertDmsCustomer({ socket, redisHelpers, JobData });
|
||||
DMSCust = { customerId: DMSCustomerInsertResponse.data };
|
||||
await setSessionTransactionData(
|
||||
socket.id,
|
||||
getTransactionType(jobid),
|
||||
FortellisCacheEnums.DMSCust,
|
||||
DMSCust,
|
||||
defaultFortellisTTL
|
||||
);
|
||||
}
|
||||
}else{
|
||||
DMSCust = { customerId: bypassCustomerId };
|
||||
}
|
||||
|
||||
let DMSVeh;
|
||||
@@ -258,8 +283,12 @@ async function FortellisSelectedCustomer({ socket, redisHelpers, selectedCustome
|
||||
DMSVeh = await getSessionTransactionData(socket.id, getTransactionType(jobid), FortellisCacheEnums.DMSVeh);
|
||||
CreateFortellisLogEvent(socket, "DEBUG", `{4.3} Updating Existing Vehicle to associate to owner.`);
|
||||
|
||||
//If it's a bypass scenario, skip this all.
|
||||
//Check to see if the vehicle needs to be updated - i.e. the owner is not the selected customer.
|
||||
if (!DMSVeh?.owners.find((o) => o.id.value === DMSCust.customerId && o.id.assigningPartyId === "CURRENT")) {
|
||||
if (
|
||||
selectedCustomerId !== bypassCustomerId &&
|
||||
!DMSVeh?.owners.find((o) => o.id.value === DMSCust.customerId && o.id.assigningPartyId === "CURRENT")
|
||||
) {
|
||||
DMSVeh = await UpdateDmsVehicle({
|
||||
socket,
|
||||
redisHelpers,
|
||||
@@ -782,12 +811,14 @@ async function InsertDmsVehicle({ socket, redisHelpers, JobData, txEnvelope, DMS
|
||||
// "chassis": "",
|
||||
// "color": "",
|
||||
// "dealerBodyStyle": "",
|
||||
deliveryDate:
|
||||
txEnvelope.dms_unsold === true
|
||||
? ""
|
||||
: moment()
|
||||
...(DMSCust?.customerId !== bypassCustomerId && {
|
||||
deliveryDate:
|
||||
txEnvelope.dms_unsold === true
|
||||
? ""
|
||||
: moment()
|
||||
// .tz(JobData.bodyshop.timezone)
|
||||
.format("YYYY-MM-DD"),
|
||||
}),
|
||||
// "deliveryMileage": 4,
|
||||
// "doorsQuantity": 4,
|
||||
// "engineNumber": "",
|
||||
@@ -902,14 +933,17 @@ async function InsertDmsVehicle({ socket, redisHelpers, JobData, txEnvelope, DMS
|
||||
// "warrantyExpDate": "2015-01-12",
|
||||
// "wheelbase": ""
|
||||
},
|
||||
owners: [
|
||||
{
|
||||
id: {
|
||||
assigningPartyId: "CURRENT",
|
||||
value: DMSCust.customerId
|
||||
// Owners is not required. Exclude it if we are bypassing.
|
||||
...(DMSCust?.customerId !== bypassCustomerId && {
|
||||
owners: [
|
||||
{
|
||||
id: {
|
||||
assigningPartyId: "CURRENT",
|
||||
value: DMSCust.customerId
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
})
|
||||
//"inventoryAccount": "237"
|
||||
}
|
||||
});
|
||||
@@ -1009,12 +1043,14 @@ async function UpdateDmsVehicle({ socket, redisHelpers, JobData, DMSVeh, DMSCust
|
||||
modelAbrev: txEnvelope.dms_model
|
||||
}
|
||||
: {}),
|
||||
deliveryDate:
|
||||
txEnvelope.dms_unsold === true
|
||||
? ""
|
||||
: moment(DMSVehToSend.vehicle.deliveryDate)
|
||||
...(DMSCust?.customerId !== bypassCustomerId && {
|
||||
deliveryDate:
|
||||
txEnvelope.dms_unsold === true
|
||||
? ""
|
||||
: moment(DMSVehToSend.vehicle.deliveryDate)
|
||||
//.tz(JobData.bodyshop.timezone)
|
||||
.toISOString()
|
||||
})
|
||||
},
|
||||
owners: ids
|
||||
}
|
||||
|
||||
@@ -6,11 +6,6 @@
|
||||
"active": false,
|
||||
"authlevel": 99
|
||||
},
|
||||
{
|
||||
"useremail": "patrick@imex.prod",
|
||||
"active": false,
|
||||
"authlevel": 99
|
||||
},
|
||||
{
|
||||
"useremail": "allan@imex.prod",
|
||||
"active": false,
|
||||
|
||||
@@ -501,7 +501,7 @@ async function CalculateRatesTotals({ job, client }) {
|
||||
? job.cieca_pfl[property.toUpperCase()].lbr_adjp
|
||||
: job.cieca_pfl[property.toUpperCase()].lbr_adjp * 100; //Adjust lbr_adjp to whole number
|
||||
} else {
|
||||
if (job.cieca_pfl["LAB"].lbr_adjp) {
|
||||
if (job.cieca_pfl["LAB"] && job.cieca_pfl["LAB"].lbr_adjp) {
|
||||
adjp =
|
||||
Math.abs(job.cieca_pfl["LAB"].lbr_adjp) > 1
|
||||
? job.cieca_pfl["LAB"].lbr_adjp
|
||||
|
||||
@@ -77,7 +77,6 @@ router.get("/wstest", eventAuthorizationMiddleware, (req, res) => {
|
||||
// text: "test2",
|
||||
// conversationid: "2b44d692-a9e4-4ed4-9c6b-7d8b0c44a0f6",
|
||||
// isoutbound: true,
|
||||
// userid: "patrick@imex.dev",
|
||||
// image: false,
|
||||
// image_path: [],
|
||||
newMessage: {
|
||||
@@ -104,7 +103,7 @@ router.get("/wstest", eventAuthorizationMiddleware, (req, res) => {
|
||||
text: `This is a test ${Math.round(Math.random() * 100)}`,
|
||||
updated_at: "2024-11-19T22:40:48.346875+00:00",
|
||||
status: "posted",
|
||||
userid: "patrick@imex.dev"
|
||||
userid: "allan@imex.prod"
|
||||
},
|
||||
conversationId: "2b44d692-a9e4-4ed4-9c6b-7d8b0c44a0f6",
|
||||
summary: false
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
* List of admin email addresses
|
||||
* @type {string[]}
|
||||
*/
|
||||
const adminEmail = [
|
||||
"patrick@imex.dev",
|
||||
//"patrick@imex.test",
|
||||
"patrick@imex.prod",
|
||||
"patrick@imexsystems.ca",
|
||||
"patrick@thinkimex.com"
|
||||
];
|
||||
const adminEmail = ["allan@imex.prod", "dave@imex.prod"];
|
||||
|
||||
module.exports = adminEmail;
|
||||
|
||||
Reference in New Issue
Block a user