Compare commits

..

1 Commits

Author SHA1 Message Date
Allan Carr
d8d8a4701e IO-2839 DMS Allocation Labels
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-07-10 14:54:04 -07:00
5 changed files with 1692 additions and 1685 deletions

View File

@@ -1,7 +1,7 @@
import { useSplitClient } from "@splitsoftware/splitio-react";
import { Button, Result } from "antd";
import LogRocket from "logrocket";
import React, { lazy, Suspense, useEffect, useMemo, useState } from "react";
import React, { lazy, Suspense, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { Route, Routes } from "react-router-dom";
@@ -9,7 +9,7 @@ import { createStructuredSelector } from "reselect";
import DocumentEditorContainer from "../components/document-editor/document-editor.container";
import ErrorBoundary from "../components/error-boundary/error-boundary.component";
// Component Imports
//Component Imports
import LoadingSpinner from "../components/loading-spinner/loading-spinner.component";
import DisclaimerPage from "../pages/disclaimer/disclaimer.page";
import LandingPage from "../pages/landing/landing.page";
@@ -28,16 +28,15 @@ import { ProductFruits } from "react-product-fruits";
const ResetPassword = lazy(() => import("../pages/reset-password/reset-password.component"));
const ManagePage = lazy(() => import("../pages/manage/manage.page.container"));
const SignInPage = lazy(() => import("../pages/sign-in/sign-in.page"));
const CsiPage = lazy(() => import("../pages/csi/csi.container.page"));
const MobilePaymentContainer = lazy(() => import("../pages/mobile-payment/mobile-payment.container"));
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser,
online: selectOnline,
bodyshop: selectBodyshop,
currentEula: selectCurrentEula
});
const mapDispatchToProps = (dispatch) => ({
checkUserSession: () => dispatch(checkUserSession()),
setOnline: (isOnline) => dispatch(setOnline(isOnline))
@@ -48,23 +47,6 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline
const [listenersAdded, setListenersAdded] = useState(false);
const { t } = useTranslation();
const workspaceCode = useMemo(
() =>
InstanceRenderMgr({
imex: null,
rome: "9BkbEseqNqxw8jUH",
promanager: "aoJoEifvezYI0Z0P"
}),
[]
);
const workspaceLogin = useMemo(
() => ({
email: currentUser.email,
username: currentUser.email
}),
[currentUser.email]
);
useEffect(() => {
if (!navigator.onLine) {
setOnline(false);
@@ -73,12 +55,16 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline
checkUserSession();
}, [checkUserSession, setOnline]);
//const b = Grid.useBreakpoint();
// console.log("Breakpoints:", b);
// Associate event listeners, memoize to prevent multiple listeners being added
useEffect(() => {
const offlineListener = () => {
const offlineListener = (e) => {
setOnline(false);
};
const onlineListener = () => {
const onlineListener = (e) => {
setOnline(true);
};
@@ -112,7 +98,7 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline
InstanceRenderMgr({
imex: "gvfvfw/bodyshopapp",
rome: "rome-online/rome-online",
promanager: "" // TODO: AIO Add in log rocket for promanager instances.
promanager: "" //TODO:AIO Add in log rocket for promanager instances.
})
);
}
@@ -125,25 +111,30 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline
handleBeta();
if (!online) {
if (!online)
return (
<Result
status="warning"
title={t("general.labels.nointernet")}
subTitle={t("general.labels.nointernet_sub")}
extra={
<Button type="primary" onClick={() => window.location.reload()}>
<Button
type="primary"
onClick={() => {
window.location.reload();
}}
>
{t("general.actions.refresh")}
</Button>
}
/>
);
}
if (currentEula && !currentUser.eulaIsAccepted) {
return <Eula />;
}
// Any route that is not assigned and matched will default to the Landing Page component
return (
<Suspense
fallback={
@@ -156,9 +147,19 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline
/>
}
>
{currentUser && currentUser.email && (
<ProductFruits workspaceCode={workspaceCode} debug language="en" user={workspaceLogin} />
)}
<ProductFruits
workspaceCode={InstanceRenderMgr({
imex: null,
rome: "9BkbEseqNqxw8jUH",
promanager: "aoJoEifvezYI0Z0P"
})}
debug
language="en"
user={{
email: currentUser.email,
username: currentUser.email
}}
/>
<Routes>
<Route

View File

@@ -647,7 +647,10 @@
"payers": "Payers"
},
"cdk_dealerid": "CDK Dealer ID",
"costsmapping": "Costs Mapping",
"dms_allocations": "DMS Allocations",
"pbs_serialnumber": "PBS Serial Number",
"profitsmapping": "Profits Mapping",
"title": "DMS"
},
"emaillater": "Email Later",

View File

@@ -647,7 +647,10 @@
"payers": ""
},
"cdk_dealerid": "",
"costsmapping": "",
"dms_allocations": "",
"pbs_serialnumber": "",
"profitsmapping": "",
"title": ""
},
"emaillater": "",

View File

@@ -647,7 +647,10 @@
"payers": ""
},
"cdk_dealerid": "",
"costsmapping": "",
"dms_allocations": "",
"pbs_serialnumber": "",
"profitsmapping": "",
"title": ""
},
"emaillater": "",