Merged in v1.0.21 (pull request #24)

V1.0.21
This commit is contained in:
Patrick Fic
2021-05-07 16:56:02 +00:00
8 changed files with 15221 additions and 21173 deletions

View File

@@ -1,6 +1,5 @@
New Features: New Features:
- - Improved glass parts recognition.
- Added additional models for more accurate group detection.
Bug Fixes: Bug Fixes:
- Updated rare bug in vehicle age calculation. -
- Improved wheel repair calculation logic.
- Improved $0 price recognition for Aftermarket and Recycled parts.

View File

@@ -57,6 +57,11 @@
"1.0.20": { "1.0.20": {
"title": "Release Notes for 1.0.20", "title": "Release Notes for 1.0.20",
"date": "04/29/2021", "date": "04/29/2021",
"notes": "Bug Fixes: \n- Improved validation for mileage from estimating systems to be more fault tolerant." "notes": "Bug Fixes: \n- Resolved age calculation issue for some 2021 models."
},
"1.0.21": {
"title": "Release Notes for 1.0.21",
"date": "05/07/2021",
"notes": "New Features: \n- Improved glass parts recognition.\n- Added additional models for more accurate group detection."
} }
} }

View File

@@ -279,6 +279,61 @@ async function DecodeLinFile(extensionlessFilePath) {
let records = await dbf.readRecords(); let records = await dbf.readRecords();
let joblines = records let joblines = records
.map((record) => { .map((record) => {
try {
console.log(
"Trying pick",
_.pick(record, [
"LINE_NO",
"LINE_IND",
// "LINE_REF",
// "TRAN_CODE",
"DB_REF",
"UNQ_SEQ",
// "WHO_PAYS",
"LINE_DESC",
"PART_TYPE",
// "PART_DESCJ",
"PRT_DSMK_M",
"OEM_PARTNO",
// "PRICE_INC",
// "ALT_PART_I",
// "TAX_PART",
"DB_PRICE",
"ACT_PRICE",
"PART_QTY",
"PRICE_J",
"GLASS_FLAG",
// "CERT_PART",
// "ALT_CO_ID",
// "ALT_PARTNO",
// "ALT_OVERRD",
// "ALT_PARTM",
// "PRT_DSMK_P",
// "MOD_LBR_TY",
// "DB_HRS",
// "MOD_LB_HRS",
// "LBR_INC",
// "LBR_OP",
// "LBR_HRS_J",
// "LBR_TYP_J",
// "LBR_OP_J",
// "PAINT_STG",
// "PAINT_TONE",
// "LBR_TAX",
// "LBR_AMT",
// "MISC_AMT",
// "MISC_SUBLT",
// "MISC_TAX",
// "BETT_TYPE",
// "BETT_PCTG",
// "BETT_AMT",
// "BETT_TAX",
])
);
} catch (error) {
console.log(error);
}
return _.transform( return _.transform(
_.pick(record, [ _.pick(record, [
"LINE_NO", "LINE_NO",
@@ -300,6 +355,7 @@ async function DecodeLinFile(extensionlessFilePath) {
"ACT_PRICE", "ACT_PRICE",
"PART_QTY", "PART_QTY",
"PRICE_J", "PRICE_J",
"GLASS_FLAG",
// "CERT_PART", // "CERT_PART",
// "ALT_CO_ID", // "ALT_CO_ID",
// "ALT_PARTNO", // "ALT_PARTNO",
@@ -326,15 +382,16 @@ async function DecodeLinFile(extensionlessFilePath) {
// "BETT_PCTG", // "BETT_PCTG",
// "BETT_AMT", // "BETT_AMT",
// "BETT_TAX", // "BETT_TAX",
"GLASS_FLAG",
]), ]),
function (result, val, key) { function (result, val, key) {
//Required because unq_seq gets pulled as a numeric instaed of a string. //Required because unq_seq gets pulled as a numeric instaed of a string.
console.log(result, val, key);
if (key === "UNQ_SEQ") { if (key === "UNQ_SEQ") {
return (result[key.toLowerCase()] = val.toString()); result[key.toLowerCase()] = val.toString();
return;
} }
return (result[key.toLowerCase()] = val); result[key.toLowerCase()] = val;
return;
} }
); );
}) })
@@ -395,6 +452,14 @@ async function DecodeLinFile(extensionlessFilePath) {
log.info(`Jobline '${jobline.line_desc}' ignored due to wheel repair.`); log.info(`Jobline '${jobline.line_desc}' ignored due to wheel repair.`);
jobline.ignore = true; jobline.ignore = true;
} }
//RPS-46 Ignore NA Line Items.
if (
jobline.part_type === "PAN" &&
jobline.price_j === true &&
jobline.db_price === 0
) {
jobline.ignore = true;
}
//RPS-39 - OEM ON OEM SAVINGS //RPS-39 - OEM ON OEM SAVINGS
if ( if (
@@ -424,15 +489,6 @@ async function DecodeLinFile(extensionlessFilePath) {
// jobline.db_price = jobline.act_price; // jobline.db_price = jobline.act_price;
// } // }
//RPS-46 Ignore NA Line Items.
if (
jobline.part_type === "PAN" &&
jobline.price_j === true &&
jobline.db_price === 0
) {
jobline.ignore = true;
}
//Update as per Norm from Rod & Waldo - Only Recycled Glass should count towards RPS, not A/M or OEM //Update as per Norm from Rod & Waldo - Only Recycled Glass should count towards RPS, not A/M or OEM
if (jobline.glass_flag && jobline.part_type !== "PAL") { if (jobline.glass_flag && jobline.part_type !== "PAL") {
jobline.ignore = true; jobline.ignore = true;

21141
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,12 +3,12 @@
"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.0.20", "version": "1.0.21",
"main": "electron/main.js", "main": "electron/main.js",
"homepage": "./", "homepage": "./",
"dependencies": { "dependencies": {
"@apollo/client": "^3.3.11", "@apollo/client": "^3.3.16",
"antd": "^4.12.3", "antd": "^4.15.4",
"apollo-link-logger": "^2.0.0", "apollo-link-logger": "^2.0.0",
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
"dbffile": "^1.4.3", "dbffile": "^1.4.3",
@@ -22,15 +22,15 @@
"firebase": "^7.24.0", "firebase": "^7.24.0",
"graphql": "^15.5.0", "graphql": "^15.5.0",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"logrocket": "^1.0.14", "logrocket": "^1.1.0",
"moment": "^2.29.1", "moment": "^2.29.1",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"nucleus-nodejs": "^3.0.8", "nucleus-nodejs": "^3.0.8",
"query-string": "^6.14.0", "query-string": "^6.14.1",
"react": "^17.0.1", "react": "^17.0.2",
"react-dom": "^17.0.1", "react-dom": "^17.0.2",
"react-infinite-scroller": "^1.2.4", "react-infinite-scroller": "^1.2.4",
"react-redux": "^7.2.1", "react-redux": "^7.2.4",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-scripts": "4.0.0", "react-scripts": "4.0.0",
"recharts": "^1.8.5", "recharts": "^1.8.5",
@@ -71,12 +71,12 @@
}, },
"devDependencies": { "devDependencies": {
"concurrently": "^5.3.0", "concurrently": "^5.3.0",
"electron": "^10.3.2", "electron": "^10.4.4",
"electron-builder": "^22.9.1", "electron-builder": "^22.10.5",
"electron-devtools-installer": "^3.1.1", "electron-devtools-installer": "^3.2.0",
"enzyme": "^3.11.0", "enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6", "enzyme-adapter-react-16": "^1.15.6",
"wait-on": "^5.2.1" "wait-on": "^5.3.0"
}, },
"build": { "build": {
"extends": null, "extends": null,

View File

@@ -21,7 +21,7 @@ export default function CloseDateDisplayMolecule({ job, jobId, close_date }) {
}); });
setLoading(true); setLoading(true);
setValue(newDate); setValue(newDate);
console.log("New R4P Date", newDate);
//Recalculate vehicle age. //Recalculate vehicle age.
const result = await updateJob({ const result = await updateJob({

View File

@@ -156,6 +156,8 @@
"HIGHLANDER SPORT V6", "HIGHLANDER SPORT V6",
"4RUNNER SR5 V6", "4RUNNER SR5 V6",
"RAV4", "RAV4",
"RAV4 HYBRID",
"RAV4 XLE HYBRID",
"HIGHLANDER", "HIGHLANDER",
"4RUNNER", "4RUNNER",
@@ -192,5 +194,10 @@
"Q3", "Q3",
"Q5", "Q5",
"Q7", "Q7",
"Q8" "Q8",
"JUKE SV",
"JUKE",
"ROGUE",
"ROGUE SV"
] ]

15122
yarn.lock Normal file

File diff suppressed because it is too large Load Diff