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",
|
"productName": "ImEX RPS",
|
||||||
"author": "ImEX Systems Inc. <support@thinkimex.com>",
|
"author": "ImEX Systems Inc. <support@thinkimex.com>",
|
||||||
"description": "ImEX RPS",
|
"description": "ImEX RPS",
|
||||||
"version": "1.6.0-alpha.6",
|
"version": "1.6.0-alpha.7",
|
||||||
"main": "electron/main.js",
|
"main": "electron/main.js",
|
||||||
"homepage": "./",
|
"homepage": "./",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -59,17 +59,17 @@ export function EstimateScrubberButton({ bodyshop, jobid, job }) {
|
|||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
const isSGI = bodyshop?.ins_rule_set === "SGI";
|
||||||
const buttonDisabled = job?.g_bett_amt == null;
|
const buttonDisabled = job?.g_bett_amt == null;
|
||||||
|
|
||||||
return buttonDisabled ? (
|
return buttonDisabled ? (
|
||||||
<Tooltip title="Additional information is required to scrub this estimate. Please reimport the estimate to enable scrubbing.">
|
<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)
|
Scrub Estimate with Estimate Scrubber (BETA)
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</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)
|
Scrub Estimate with Estimate Scrubber (BETA)
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export function JobsDetailOrganism({ bodyshop, selectedJobId, setSelectedJobTarg
|
|||||||
job: data.jobs_by_pk
|
job: data.jobs_by_pk
|
||||||
});
|
});
|
||||||
}, [data, setSelectedJobTargetPc]);
|
}, [data, setSelectedJobTargetPc]);
|
||||||
|
const isSgi = bodyshop?.ins_rule_set === "SGI";
|
||||||
if (!selectedJobId)
|
if (!selectedJobId)
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -86,22 +86,23 @@ export function JobsDetailOrganism({ bodyshop, selectedJobId, setSelectedJobTarg
|
|||||||
<Card title="Estimate Lines">
|
<Card title="Estimate Lines">
|
||||||
<JobsLinesTableMolecule loading={loading} job={data ? data.jobs_by_pk : {}} />
|
<JobsLinesTableMolecule loading={loading} job={data ? data.jobs_by_pk : {}} />
|
||||||
</Card>
|
</Card>
|
||||||
{bodyshop.ins_rule_set === "MPI" ? (
|
{bodyshop.es_api_key ? (
|
||||||
bodyshop.es_api_key ? (
|
<Badge.Ribbon text="BETA" color="red">
|
||||||
<Badge.Ribbon text="BETA" color="red">
|
<Card id="es-results-card" title="Estimate Scrubber Results" extra={[]}>
|
||||||
<Card id="es-results-card" title="Estimate Scrubber Results" extra={[]}>
|
<EstimateScrubberResultsMolecule loading={loading} job={data ? data.jobs_by_pk : {}} />
|
||||||
<EstimateScrubberResultsMolecule loading={loading} job={data ? data.jobs_by_pk : {}} />
|
</Card>
|
||||||
</Card>
|
</Badge.Ribbon>
|
||||||
</Badge.Ribbon>
|
) : (
|
||||||
) : (
|
<Badge.Ribbon text={isSgi ? "COMING SOON" : null} color="red">
|
||||||
<Card title="Estimate Scrubber">
|
<Card title="Estimate Scrubber">
|
||||||
<Result
|
<Result
|
||||||
status="info"
|
status="info"
|
||||||
title="Are you missing out on profit?"
|
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={
|
extra={
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
disabled={isSgi}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const { ipcRenderer } = window;
|
const { ipcRenderer } = window;
|
||||||
ipcRenderer.send(
|
ipcRenderer.send(
|
||||||
@@ -110,34 +111,12 @@ export function JobsDetailOrganism({ bodyshop, selectedJobId, setSelectedJobTarg
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Get Started
|
{isSgi ? "Integration coming soon" : "Get Started"}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
></Result>
|
></Result>
|
||||||
</Card>
|
</Card>
|
||||||
)
|
</Badge.Ribbon>
|
||||||
) : (
|
|
||||||
<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>
|
|
||||||
)}
|
)}
|
||||||
<Card title="Parts Breakdown">
|
<Card title="Parts Breakdown">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -17,17 +17,18 @@ import ipcTypes from "../../../ipc.types";
|
|||||||
import { selectDarkMode } from "../../../redux/user/user.selectors";
|
import { selectDarkMode } from "../../../redux/user/user.selectors";
|
||||||
import SiderSignOut from "../../molecules/sider-sign-out/sider-sign-out.molecule";
|
import SiderSignOut from "../../molecules/sider-sign-out/sider-sign-out.molecule";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { toggleDarkMode } from "../../../redux/user/user.actions";
|
import { signOutStart, toggleDarkMode } from "../../../redux/user/user.actions";
|
||||||
const { ipcRenderer } = window;
|
const { ipcRenderer } = window;
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
darkMode: selectDarkMode
|
darkMode: selectDarkMode
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
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();
|
const { pathname } = useLocation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -42,6 +43,9 @@ export function SiderMenuOrganism({ darkMode, toggleDarkMode }) {
|
|||||||
case "quit":
|
case "quit":
|
||||||
ipcRenderer.send(ipcTypes.quit);
|
ipcRenderer.send(ipcTypes.quit);
|
||||||
break;
|
break;
|
||||||
|
case "signout":
|
||||||
|
signOutStart();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -77,7 +81,7 @@ export function SiderMenuOrganism({ darkMode, toggleDarkMode }) {
|
|||||||
{
|
{
|
||||||
key: "signout",
|
key: "signout",
|
||||||
icon: <LogoutOutlined style={{ color: "tomato" }} />,
|
icon: <LogoutOutlined style={{ color: "tomato" }} />,
|
||||||
label: <SiderSignOut />
|
label: "Sign out"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "quit",
|
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 (
|
return (
|
||||||
<Layout style={{ height: "100vh" }} hasSider>
|
<Layout style={{ height: "100vh" }} hasSider>
|
||||||
<Layout.Sider style={{ background: !darkMode && "#fff" }} collapsible defaultCollapsed="true">
|
<Layout.Sider style={{ background: !darkMode && "#fff" }} collapsible defaultCollapsed="true">
|
||||||
@@ -48,6 +37,14 @@ export function RoutesPage({ bodyshop, darkMode }) {
|
|||||||
<Layout style={{}}>
|
<Layout style={{}}>
|
||||||
<Layout.Content style={{ marginLeft: "1rem", height: "100%" }}>
|
<Layout.Content style={{ marginLeft: "1rem", height: "100%" }}>
|
||||||
<NotificationModalOrganism />
|
<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>
|
<Routes>
|
||||||
<Route exact path="/settings" element={<SettingsPage />} />
|
<Route exact path="/settings" element={<SettingsPage />} />
|
||||||
<Route exact path="/reporting" element={<ReportingPage />} />
|
<Route exact path="/reporting" element={<ReportingPage />} />
|
||||||
|
|||||||
Reference in New Issue
Block a user