Updated SGI alert, resolved sign out button issue and updated ES text for SK.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"productName": "ImEX RPS",
|
||||
"author": "ImEX Systems Inc. <support@thinkimex.com>",
|
||||
"description": "ImEX RPS",
|
||||
"version": "1.6.0-alpha.6",
|
||||
"version": "1.6.0-alpha.7",
|
||||
"main": "electron/main.js",
|
||||
"homepage": "./",
|
||||
"dependencies": {
|
||||
|
||||
@@ -59,17 +59,17 @@ export function EstimateScrubberButton({ bodyshop, jobid, job }) {
|
||||
}
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
const isSGI = bodyshop?.ins_rule_set === "SGI";
|
||||
const buttonDisabled = job?.g_bett_amt == null;
|
||||
|
||||
return buttonDisabled ? (
|
||||
<Tooltip title="Additional information is required to scrub this estimate. Please reimport the estimate to enable scrubbing.">
|
||||
<Button disabled={job?.g_bett_amt == null} loading={loading}>
|
||||
<Button disabled={isSGI || job?.g_bett_amt == null} loading={loading}>
|
||||
Scrub Estimate with Estimate Scrubber (BETA)
|
||||
</Button>
|
||||
</Tooltip>
|
||||
) : (
|
||||
<Button onClick={handleScrub} disabled={job?.g_bett_amt == null} loading={loading}>
|
||||
<Button onClick={handleScrub} disabled={isSGI || job?.g_bett_amt == null} loading={loading}>
|
||||
Scrub Estimate with Estimate Scrubber (BETA)
|
||||
</Button>
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ export function JobsDetailOrganism({ bodyshop, selectedJobId, setSelectedJobTarg
|
||||
job: data.jobs_by_pk
|
||||
});
|
||||
}, [data, setSelectedJobTargetPc]);
|
||||
|
||||
const isSgi = bodyshop?.ins_rule_set === "SGI";
|
||||
if (!selectedJobId)
|
||||
return (
|
||||
<div
|
||||
@@ -86,22 +86,23 @@ export function JobsDetailOrganism({ bodyshop, selectedJobId, setSelectedJobTarg
|
||||
<Card title="Estimate Lines">
|
||||
<JobsLinesTableMolecule loading={loading} job={data ? data.jobs_by_pk : {}} />
|
||||
</Card>
|
||||
{bodyshop.ins_rule_set === "MPI" ? (
|
||||
bodyshop.es_api_key ? (
|
||||
<Badge.Ribbon text="BETA" color="red">
|
||||
<Card id="es-results-card" title="Estimate Scrubber Results" extra={[]}>
|
||||
<EstimateScrubberResultsMolecule loading={loading} job={data ? data.jobs_by_pk : {}} />
|
||||
</Card>
|
||||
</Badge.Ribbon>
|
||||
) : (
|
||||
{bodyshop.es_api_key ? (
|
||||
<Badge.Ribbon text="BETA" color="red">
|
||||
<Card id="es-results-card" title="Estimate Scrubber Results" extra={[]}>
|
||||
<EstimateScrubberResultsMolecule loading={loading} job={data ? data.jobs_by_pk : {}} />
|
||||
</Card>
|
||||
</Badge.Ribbon>
|
||||
) : (
|
||||
<Badge.Ribbon text={isSgi ? "COMING SOON" : null} color="red">
|
||||
<Card title="Estimate Scrubber">
|
||||
<Result
|
||||
status="info"
|
||||
title="Are you missing out on profit?"
|
||||
subTitle="Estimate Scrubber identifies additional billing opportunities and potential issues with your estimates to help maximize your revenue. Get started with a free 30 day trial today."
|
||||
subTitle={`Estimate Scrubber identifies additional billing opportunities and potential issues with your estimates to help maximize your revenue. ${isSgi ? `Direct integration coming soon for Saskatchewan based users.` : "Get started with a free 30 day trial today."}`}
|
||||
extra={
|
||||
<Button
|
||||
type="primary"
|
||||
disabled={isSgi}
|
||||
onClick={() => {
|
||||
const { ipcRenderer } = window;
|
||||
ipcRenderer.send(
|
||||
@@ -110,34 +111,12 @@ export function JobsDetailOrganism({ bodyshop, selectedJobId, setSelectedJobTarg
|
||||
);
|
||||
}}
|
||||
>
|
||||
Get Started
|
||||
{isSgi ? "Integration coming soon" : "Get Started"}
|
||||
</Button>
|
||||
}
|
||||
></Result>
|
||||
</Card>
|
||||
)
|
||||
) : (
|
||||
<Card title="Estimate Scrubber coming soon to Saskatchewan">
|
||||
<Result
|
||||
status="info"
|
||||
title="Are you missing out on profit?"
|
||||
subTitle="Estimate Scrubber identifies additional billing opportunities and potential issues with your estimates to help maximize your revenue. Join the waitlist now."
|
||||
extra={
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
const { ipcRenderer } = window;
|
||||
ipcRenderer.send(
|
||||
ipcTypes.app.toMain.openExternalWindow,
|
||||
"https://atamb.ca/estimate-scrubber-trial?utm_source=imex_rps&utm_medium=app&utm_campaign=es_trial_banner"
|
||||
);
|
||||
}}
|
||||
>
|
||||
Get Started
|
||||
</Button>
|
||||
}
|
||||
></Result>
|
||||
</Card>
|
||||
</Badge.Ribbon>
|
||||
)}
|
||||
<Card title="Parts Breakdown">
|
||||
<div
|
||||
|
||||
@@ -17,17 +17,18 @@ import ipcTypes from "../../../ipc.types";
|
||||
import { selectDarkMode } from "../../../redux/user/user.selectors";
|
||||
import SiderSignOut from "../../molecules/sider-sign-out/sider-sign-out.molecule";
|
||||
import { connect } from "react-redux";
|
||||
import { toggleDarkMode } from "../../../redux/user/user.actions";
|
||||
import { signOutStart, toggleDarkMode } from "../../../redux/user/user.actions";
|
||||
const { ipcRenderer } = window;
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
darkMode: selectDarkMode
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
toggleDarkMode: () => dispatch(toggleDarkMode())
|
||||
toggleDarkMode: () => dispatch(toggleDarkMode()),
|
||||
signOutStart: () => dispatch(signOutStart())
|
||||
});
|
||||
|
||||
export function SiderMenuOrganism({ darkMode, toggleDarkMode }) {
|
||||
export function SiderMenuOrganism({ darkMode, toggleDarkMode, signOutStart }) {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
return (
|
||||
@@ -42,6 +43,9 @@ export function SiderMenuOrganism({ darkMode, toggleDarkMode }) {
|
||||
case "quit":
|
||||
ipcRenderer.send(ipcTypes.quit);
|
||||
break;
|
||||
case "signout":
|
||||
signOutStart();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -77,7 +81,7 @@ export function SiderMenuOrganism({ darkMode, toggleDarkMode }) {
|
||||
{
|
||||
key: "signout",
|
||||
icon: <LogoutOutlined style={{ color: "tomato" }} />,
|
||||
label: <SiderSignOut />
|
||||
label: "Sign out"
|
||||
},
|
||||
{
|
||||
key: "quit",
|
||||
|
||||
@@ -29,17 +29,6 @@ export function RoutesPage({ bodyshop, darkMode }) {
|
||||
/>
|
||||
);
|
||||
|
||||
if (bodyshop?.ins_rule_set === "SGI") {
|
||||
notification.warning({
|
||||
message: "SGI Target Warning",
|
||||
description: "SGI has not yet released savings targets or eligibility rules. Targets will be displayed as $0. MPI eligibility rules have been applied and may be incorrect.",
|
||||
placement: "bottomLeft",
|
||||
key: "sgi-target-warning",
|
||||
duration: -1,
|
||||
closable: false
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<Layout style={{ height: "100vh" }} hasSider>
|
||||
<Layout.Sider style={{ background: !darkMode && "#fff" }} collapsible defaultCollapsed="true">
|
||||
@@ -48,6 +37,14 @@ export function RoutesPage({ bodyshop, darkMode }) {
|
||||
<Layout style={{}}>
|
||||
<Layout.Content style={{ marginLeft: "1rem", height: "100%" }}>
|
||||
<NotificationModalOrganism />
|
||||
{bodyshop?.ins_rule_set === "SGI" && (
|
||||
<Alert
|
||||
message="SGI has not yet released savings targets or eligibility rules. Targets will be displayed as $0. MPI eligibility rules have been applied and may be incorrect."
|
||||
type="warning"
|
||||
showIcon
|
||||
style={{ marginBottom: "1rem" }}
|
||||
/>
|
||||
)}
|
||||
<Routes>
|
||||
<Route exact path="/settings" element={<SettingsPage />} />
|
||||
<Route exact path="/reporting" element={<ReportingPage />} />
|
||||
|
||||
Reference in New Issue
Block a user