Add SUV and quantity check.

This commit is contained in:
Patrick Fic
2024-09-18 12:45:06 -07:00
parent 6c4a695b0d
commit 30d1ab5563
4 changed files with 21 additions and 4 deletions

View File

@@ -173,5 +173,10 @@
"title": "Release Notes for 1.3.2",
"date": "09/06/2024",
"notes": "Improvements\n* Sourced an additional 150 models for improved detection of SUVs and Vans.\r\n* Added the ability to change groups for jobs imported under the latest set of MPI rules."
},
"1.3.3": {
"title": "Release Notes for 1.3.3",
"date": "",
"notes": "Improvements\n*Added new SUV models.\r\n* Added a warning when quantities great than 1 were detected."
}
}

View File

@@ -3,7 +3,7 @@
"productName": "ImEX RPS",
"author": "ImEX Systems Inc. <support@thinkimex.com>",
"description": "ImEX RPS",
"version": "1.3.2",
"version": "1.3.3-alpha",
"main": "electron/main.js",
"homepage": "./",
"dependencies": {

View File

@@ -1,7 +1,7 @@
import { WarningOutlined } from "@ant-design/icons";
import { PageHeader } from "@ant-design/pro-layout";
import { Alert, Descriptions, Skeleton, Space, Tooltip } from "antd";
import React from "react";
import React, { useMemo } from "react";
import { DateFormat, WhichRulesetToApply } from "../../../util/constants";
import dayjs from "../../../util/day.js";
import CurrencyFormatterAtom from "../../atoms/currency-formatter/currency-formatter.atom";
@@ -13,13 +13,16 @@ import CloseDateDisplayMolecule from "../close-date-display/close-date-display.m
import JobGroupMolecule from "../job-group/job-group.molecule";
export default function JobsDetailDescriptionMolecule({ loading, job }) {
const hasQuantityGreaterThan1 = useMemo(() => {
return job?.joblines?.find((jl) => !jl.ignore && jl.quantity > 1);
}, [job]);
if (loading) return <Skeleton active />;
if (!job)
return (
<ErrorResultAtom title="Error displaying job header data." errorMessage="It looks like this job doesn't exist." />
);
const ruleSetToApply = WhichRulesetToApply(job.close_date);
return (
<div>
<PageHeader
@@ -83,6 +86,14 @@ export default function JobsDetailDescriptionMolecule({ loading, job }) {
</Space>
</Descriptions.Item>
</Descriptions>
{!hasQuantityGreaterThan1 && (
<Alert
type="warning"
showIcon
message="At least one estimate line has multiple quantities. MPI best practices for RPS recognition is to create multiple lines rather than increase quantity."
/>
)}
</PageHeader>
</div>
);

View File

@@ -355,5 +355,6 @@
"EQUINOX EV",
"NAUTILUS HYBRID",
"TRAVERSE LIMITED",
"CX-70"
"CX-70",
"SANTA FE XL"
]