Resolve issue for vehicles under 20000km.
This commit is contained in:
@@ -163,5 +163,10 @@
|
||||
"title": "Release Notes for 1.3.0",
|
||||
"date": "08/16/2024",
|
||||
"notes": "New Features\n* Added support for new MPI rules. The rules will apply to all jobs with an R4P date on or after September 1, 2024. If a job R4P date is changed across this date, the job will need to be reimported to have correct scoring."
|
||||
},
|
||||
"1.3.1": {
|
||||
"title": "Release Notes for 1.3.1",
|
||||
"date": "08/16/2024",
|
||||
"notes": "Bug Fix\n* Resolved incorrect targets for vehicles under 20,000 miles under current rule set."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"productName": "ImEX RPS",
|
||||
"author": "ImEX Systems Inc. <support@thinkimex.com>",
|
||||
"description": "ImEX RPS",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"main": "electron/main.js",
|
||||
"homepage": "./",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import { CloudUploadOutlined, WarningOutlined } from "@ant-design/icons";
|
||||
import { Alert, Input, Space, Table, Tooltip } from "antd";
|
||||
import dayjs from "../../../util/day.js";
|
||||
import React, { useState } from "react";
|
||||
import { useMemo } from "react";
|
||||
import { CloudUploadOutlined } from "@ant-design/icons";
|
||||
import { Alert, Input, Space, Table } from "antd";
|
||||
import React, { useMemo, useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Link } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import ipcTypes from "../../../ipc.types";
|
||||
import { setSelectedJobId } from "../../../redux/application/application.actions";
|
||||
import { selectReportData, selectReportLoading, selectScorecard } from "../../../redux/reporting/reporting.selectors";
|
||||
import dayjs from "../../../util/day.js";
|
||||
import { alphaSort } from "../../../util/sorters";
|
||||
import VehicleGroupAlertAtom from "../../atoms/vehicle-group-alert/vehicle-group-alert.atom";
|
||||
import GroupVerifySwitch from "../group-verify-switch/group-verify-switch.component";
|
||||
@@ -111,11 +110,11 @@ export function ReportingJobsListMolecule({ scoreCard, reportingLoading, reportD
|
||||
}}
|
||||
>
|
||||
{`${record.jobRpsDollars.toFormat()} / ${record.expectedRpsDollars.toFormat()}`}
|
||||
{record.v_mileage < 20000 && (
|
||||
{/* {record.v_mileage < 20000 && (
|
||||
<Tooltip title="Vehicle is under 20,000 KMs. No expected savings.">
|
||||
<WarningOutlined style={{ color: "seagreen" }} />
|
||||
</Tooltip>
|
||||
)}
|
||||
)} */}
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
|
||||
@@ -21,17 +21,16 @@ export default function GetJobTarget({ group, v_age, targets, close_date, v_mile
|
||||
// console.log("Result:", 1);
|
||||
// }
|
||||
|
||||
//V3 Check - If vehicle is less than 20,000KM, there is NO TARGET.
|
||||
if (v_mileage && v_mileage <= 20000) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
//V2 Check
|
||||
const newTargets = store.getState().user.targets;
|
||||
|
||||
const rulesToApply = WhichRulesetToApply(close_date);
|
||||
if (rulesToApply === "V3") {
|
||||
const v3Target = V3TargetAndGroupFinder(job)
|
||||
//V3 Check - If vehicle is less than 20,000KM, there is NO TARGET.
|
||||
if (v_mileage && v_mileage <= 20000) {
|
||||
return 0;
|
||||
}
|
||||
const v3Target = V3TargetAndGroupFinder(job);
|
||||
return v3Target?.target || 0.023;
|
||||
} else {
|
||||
const newTargetsForGroup = newTargets.filter((t) => t.name === rulesToApply && t.group === group);
|
||||
|
||||
Reference in New Issue
Block a user