From 54e40e24e99c919e2e920e198680822cf8dd4c5a Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 16 Dec 2020 14:12:45 -0800 Subject: [PATCH 01/10] Package updates + added new models for warnings. --- electron/changelog.json | 5 +++++ package.json | 2 +- .../atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/electron/changelog.json b/electron/changelog.json index 31b63f0..78f10ee 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -23,5 +23,10 @@ "title": "Release Notes for 1.0.13", "date": "11/30/2020", "notes": "New Features: \n- Added 'This Quarter' and 'Last Quarter' date quick select.\n\nBug Fixes: \n- Added automatic job refresh on new import for estimate detail screen.\n- Fixed an issue where more jobs would not be fetched in the list view in certain scenarios." + }, + "1.0.14": { + "title": "Release Notes for 1.0.14", + "date": "TBD", + "notes": "" } } diff --git a/package.json b/package.json index 8b3782b..db48ca6 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "ImEX RPS", "author": "ImEX Systems Inc. ", "description": "ImEX RPS", - "version": "1.0.13", + "version": "1.0.14", "main": "electron/main.js", "homepage": "./", "dependencies": { diff --git a/src/components/atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx b/src/components/atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx index f2e2e53..57db154 100644 --- a/src/components/atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx +++ b/src/components/atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx @@ -15,6 +15,13 @@ const models = [ "nv200", "rav4", "odyssey", + "murano", + "edge", + "ram", + "kicks", + "qashqai", + "escape", + "santa fe", ]; export default function VehicleGroupAlertAtom({ job, showGroup = false }) { From 18061094acef1bf0e8c44978c319bad563cc981a Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 10:59:48 -0800 Subject: [PATCH 02/10] Fix restore from tray on second instance RPS-69 --- electron/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/electron/main.js b/electron/main.js index d71da0a..a7445f5 100644 --- a/electron/main.js +++ b/electron/main.js @@ -119,8 +119,8 @@ function createWindow() { // Create the browser window. Menu.setApplicationMenu(menu); mainWindow = new BrowserWindow({ - width: 800, - height: 600, + // width: 800, + // height: 600, title: `ImEX RPS ${app.getVersion()}`, icon: path.join(__dirname, "../src/assets/logo192.png"), webPreferences: { @@ -141,6 +141,7 @@ function createWindow() { // Someone tried to run a second instance, we should focus our window. if (mainWindow) { if (mainWindow.isMinimized()) mainWindow.restore(); + mainWindow.show(); mainWindow.focus(); } }); @@ -228,6 +229,7 @@ app.on("window-all-closed", () => { app.on("activate", () => { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. + console.log("Activate"); if (BrowserWindow.getAllWindows().length === 0) { createWindow(); } From 287e8a619cf67b83d600034b3a34e749f7854e8e Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 11:31:02 -0800 Subject: [PATCH 03/10] Removed prevention of negative RPS scores for non-oem parts RPS-72 --- electron/decoder/decoder.js | 18 +++++++++--------- src/util/CalculateJobRps.js | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/electron/decoder/decoder.js b/electron/decoder/decoder.js index e323bd0..c726b90 100644 --- a/electron/decoder/decoder.js +++ b/electron/decoder/decoder.js @@ -389,15 +389,15 @@ async function DecodeLinFile(extensionlessFilePath) { jobline.db_price = jobline.act_price; } - if ( - !!jobline.db_price && - jobline.db_price > 0 && - !!jobline.act_price && - jobline.act_price > jobline.db_price - ) { - //Actual price should never be higher than the DB Price. - jobline.db_price = jobline.act_price; - } + // if ( + // !!jobline.db_price && + // jobline.db_price > 0 && + // !!jobline.act_price && + // jobline.act_price > jobline.db_price + // ) { + // //Actual price should never be higher than the DB Price. + // jobline.db_price = jobline.act_price; + // } //Logic Based Exclusions. if ( diff --git a/src/util/CalculateJobRps.js b/src/util/CalculateJobRps.js index fe8b4ae..606574f 100644 --- a/src/util/CalculateJobRps.js +++ b/src/util/CalculateJobRps.js @@ -13,15 +13,15 @@ export function CalculateJobRpsDollars(job, returnSumActPrice) { val.part_qty || 1 ) ); - if (val.price_diff > 0) { - return acc.add( - Dinero({ amount: Math.round((val.price_diff || 0) * 100) }).multiply( - val.part_qty || 1 - ) - ); - } else { - return acc; - } + // if (val.price_diff > 0) { // + return acc.add( + Dinero({ amount: Math.round((val.price_diff || 0) * 100) }).multiply( + val.part_qty || 1 + ) + ); + // } else { + // return acc; + // } }, Dinero()); return returnSumActPrice ? { actPriceSum, jobRpsDollars } : jobRpsDollars; } From 54a693744e8775541a6d521dd8bb334867ef69fb Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 11:47:22 -0800 Subject: [PATCH 04/10] Resolved date searching issues that would include an extra day RPS-72 --- .../molecules/reporting-dates/reporting-dates.molecule.jsx | 1 + src/redux/reporting/reporting.sagas.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/reporting-dates/reporting-dates.molecule.jsx b/src/components/molecules/reporting-dates/reporting-dates.molecule.jsx index d9fc424..f380f4d 100644 --- a/src/components/molecules/reporting-dates/reporting-dates.molecule.jsx +++ b/src/components/molecules/reporting-dates/reporting-dates.molecule.jsx @@ -34,6 +34,7 @@ export function ReportingDatesMolecule({ queryReportingData }) { rules={[{ type: "array", required: true }]} > Date: Fri, 18 Dec 2020 11:52:57 -0800 Subject: [PATCH 05/10] Automatically maximize window on restore RPS-69 --- electron/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electron/main.js b/electron/main.js index a7445f5..c8b5513 100644 --- a/electron/main.js +++ b/electron/main.js @@ -143,6 +143,7 @@ function createWindow() { if (mainWindow.isMinimized()) mainWindow.restore(); mainWindow.show(); mainWindow.focus(); + mainWindow.maximize(); } }); @@ -255,6 +256,7 @@ function createTray() { appIcon.on("double-click", function (event) { mainWindow.show(); + mainWindow.maximize(); }); appIcon.setToolTip("ImEX RPS"); appIcon.setContextMenu(contextMenu); From 3fc5125d88afb5c21daf13045a51af103ae48c93 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 11:55:09 -0800 Subject: [PATCH 06/10] Added changelog and release notes for 1.0.14. --- WIP Changelog.txt | 5 +++-- electron/changelog.json | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WIP Changelog.txt b/WIP Changelog.txt index f94a939..cccc10f 100644 --- a/WIP Changelog.txt +++ b/WIP Changelog.txt @@ -2,5 +2,6 @@ New Features: - Added 'This Quarter' and 'Last Quarter' date quick select. Bug Fixes: -- Added automatic job refresh on new import for estimate detail screen. -- Fixed an issue where more jobs would not be fetched in the list view in certain scenarios. \ No newline at end of file +- Resolved an issue where launching a second instance of RPS would cause the program to freeze. +- Date filtering will now ensure only correct dates are reported on, regardless of time zone. +- Added negative RPS calculations on combined estimate lines like assemblies. \ No newline at end of file diff --git a/electron/changelog.json b/electron/changelog.json index 78f10ee..13c79da 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -26,7 +26,7 @@ }, "1.0.14": { "title": "Release Notes for 1.0.14", - "date": "TBD", - "notes": "" + "date": "12/18/2020", + "notes": "Bug Fixes: \n- Resolved an issue where launching a second instance of RPS would cause the program to freeze.\n- Date filtering will now ensure only correct dates are reported on, regardless of time zone.\n- Added negative RPS calculations on combined estimate lines like assemblies." } } From 48ff7e7c42ae2951a8ba3fc23de85f374c7267fd Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 11:57:23 -0800 Subject: [PATCH 07/10] Removed errant log line. --- electron/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/electron/main.js b/electron/main.js index c8b5513..b07da54 100644 --- a/electron/main.js +++ b/electron/main.js @@ -331,7 +331,6 @@ autoUpdater.on("update-downloaded", (ev, info) => { buttons: ["Yes", "No"], }) .then(({ response }) => { - log.log("The button worked.", response); if (response === 0) { const isSilent = true; const isForceRunAfter = true; From 430e65f23f061093baf7021c4170b46ec34551f8 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 14:15:09 -0800 Subject: [PATCH 08/10] Revised changelog. --- electron/changelog.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/changelog.json b/electron/changelog.json index 13c79da..c4810cb 100644 --- a/electron/changelog.json +++ b/electron/changelog.json @@ -27,6 +27,6 @@ "1.0.14": { "title": "Release Notes for 1.0.14", "date": "12/18/2020", - "notes": "Bug Fixes: \n- Resolved an issue where launching a second instance of RPS would cause the program to freeze.\n- Date filtering will now ensure only correct dates are reported on, regardless of time zone.\n- Added negative RPS calculations on combined estimate lines like assemblies." + "notes": "Bug Fixes: \n- Resolved an issue where launching a second instance of RPS could cause the program to occasionally freeze.\n- Fixed an issue where date filtering could include dates outside the range depending on time zone.\n- Added negative RPS calculations on combined estimate lines like assemblies." } } From f34c7cbebef855f7a8db559553add7f1117f318f Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 14:24:52 -0800 Subject: [PATCH 09/10] Updated tooltip for close date. --- .../jobs-detail-description.molecule.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 a679ac7..f067785 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,4 +1,4 @@ -import { Descriptions, PageHeader, Skeleton } from "antd"; +import { Descriptions, PageHeader, Skeleton, Tooltip } from "antd"; import React from "react"; import CurrencyFormatterAtom from "../../atoms/currency-formatter/currency-formatter.atom"; import ErrorResultAtom from "../../atoms/error-result/error-result.atom"; @@ -39,12 +39,20 @@ export default function JobsDetailDescriptionMolecule({ loading, job }) { {job.v_age} - + + + Close Date + + } + > + {job.updated_at} From 44bbb17243e70362f6a63c53f05900b671200ec4 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 18 Dec 2020 14:31:56 -0800 Subject: [PATCH 10/10] Updated tooltip once more and added vehicles to alert atom. --- .../atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx | 3 ++- .../jobs-detail-description.molecule.jsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx b/src/components/atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx index 57db154..e14c488 100644 --- a/src/components/atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx +++ b/src/components/atoms/vehicle-group-alert/vehicle-group-alert.atom.jsx @@ -14,7 +14,7 @@ const models = [ "journey", "nv200", "rav4", - "odyssey", + //"odyssey", "murano", "edge", "ram", @@ -22,6 +22,7 @@ const models = [ "qashqai", "escape", "santa fe", + "trax", ]; export default function VehicleGroupAlertAtom({ job, showGroup = false }) { 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 f067785..19286a6 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 @@ -42,7 +42,7 @@ export default function JobsDetailDescriptionMolecule({ loading, job }) { + Close Date }