Merged in v1.0.14 (pull request #17)

V1.0.14
This commit is contained in:
Patrick Fic
2020-12-18 22:51:21 +00:00
10 changed files with 57 additions and 28 deletions

View File

@@ -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.
- 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.

View File

@@ -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": "12/18/2020",
"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."
}
}

View File

@@ -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 (

View File

@@ -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,7 +141,9 @@ 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();
mainWindow.maximize();
}
});
@@ -228,6 +230,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();
}
@@ -253,6 +256,7 @@ function createTray() {
appIcon.on("double-click", function (event) {
mainWindow.show();
mainWindow.maximize();
});
appIcon.setToolTip("ImEX RPS");
appIcon.setContextMenu(contextMenu);
@@ -327,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;

View File

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

View File

@@ -14,7 +14,15 @@ const models = [
"journey",
"nv200",
"rav4",
"odyssey",
//"odyssey",
"murano",
"edge",
"ram",
"kicks",
"qashqai",
"escape",
"santa fe",
"trax",
];
export default function VehicleGroupAlertAtom({ job, showGroup = false }) {

View File

@@ -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 }) {
<JobGroupMolecule jobId={job.id} group={job.group} job={job} />
</Descriptions.Item>
<Descriptions.Item label="Age">{job.v_age}</Descriptions.Item>
<Descriptions.Item label="Close Date">
<Descriptions.Item
label={
<Tooltip title="This is the date you will submit for payment from MPI.">
Close Date
</Tooltip>
}
>
<CloseDateDisplayMolecule
jobId={job.id}
close_date={job.close_date}
/>
</Descriptions.Item>
<Descriptions.Item label="Last Updated">
<TimeAgoFormatter>{job.updated_at}</TimeAgoFormatter>
</Descriptions.Item>

View File

@@ -34,6 +34,7 @@ export function ReportingDatesMolecule({ queryReportingData }) {
rules={[{ type: "array", required: true }]}
>
<DatePicker.RangePicker
format="YYYY-MM-DD"
ranges={{
Today: [moment(), moment()],
"Last 14 days": [moment().subtract(14, "days"), moment()],

View File

@@ -28,7 +28,10 @@ export function* onQueryReportData() {
export function* queryReportingData({ payload: { startDate, endDate } }) {
const result = yield client.query({
query: REPORTING_GET_JOBS,
variables: { startDate, endDate },
variables: {
startDate: startDate.format("YYYY-MM-DD"),
endDate: endDate.format("YYYY-MM-DD"),
},
});
if (result.errors) {
log.error("Error fetching report data.", result.errors);

View File

@@ -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;
}