From 30d1ab5563bb8b566af2e527a1b00ab373f9441d Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 18 Sep 2024 12:45:06 -0700 Subject: [PATCH] Add SUV and quantity check. --- electron/changelog.json | 5 +++++ package.json | 2 +- .../jobs-detail-description.molecule.jsx | 15 +++++++++++++-- src/ipc/suvs.json | 3 ++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/electron/changelog.json b/electron/changelog.json index 64981ec..6912438 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -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." } } diff --git a/package.json b/package.json index e805e87..955726f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "ImEX RPS", "author": "ImEX Systems Inc. ", "description": "ImEX RPS", - "version": "1.3.2", + "version": "1.3.3-alpha", "main": "electron/main.js", "homepage": "./", "dependencies": { diff --git a/src/components/molecules/jobs-detail-description/jobs-detail-description.molecule.jsx b/src/components/molecules/jobs-detail-description/jobs-detail-description.molecule.jsx index 136fda8..cd6c54f 100644 --- a/src/components/molecules/jobs-detail-description/jobs-detail-description.molecule.jsx +++ b/src/components/molecules/jobs-detail-description/jobs-detail-description.molecule.jsx @@ -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 ; - if (!job) return ( ); const ruleSetToApply = WhichRulesetToApply(job.close_date); + return (
+ + {!hasQuantityGreaterThan1 && ( + + )}
); diff --git a/src/ipc/suvs.json b/src/ipc/suvs.json index 140a0af..350d684 100644 --- a/src/ipc/suvs.json +++ b/src/ipc/suvs.json @@ -355,5 +355,6 @@ "EQUINOX EV", "NAUTILUS HYBRID", "TRAVERSE LIMITED", - "CX-70" + "CX-70", + "SANTA FE XL" ]