Auditing refinements.
This commit is contained in:
@@ -28,7 +28,7 @@ ipcMain.on(ipcTypes.default.audit.toMain.browseForFile, async (event, { sheetNam
|
||||
} else if (foundHeaderRow && !foundTotalRow && line[0] && line[0] !== "Grand Total") {
|
||||
//Add it to the array
|
||||
const row = {
|
||||
clm_no: line[0],
|
||||
clm_no: line[0].startsWith("00") ? line[0].slice(2) : line[0],
|
||||
close_date: line[1],
|
||||
v_model_yr: line[3],
|
||||
v_makedesc: line[4],
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
const path = require("path");
|
||||
const {
|
||||
app,
|
||||
BrowserWindow,
|
||||
Tray,
|
||||
Menu,
|
||||
ipcMain,
|
||||
dialog,
|
||||
shell,
|
||||
globalShortcut,
|
||||
} = require("electron");
|
||||
const { app, BrowserWindow, Tray, Menu, ipcMain, dialog, shell, globalShortcut } = require("electron");
|
||||
const isDev = require("electron-is-dev");
|
||||
const { default: ipcTypes } = require("../src/ipc.types.commonjs");
|
||||
const { store } = require("./electron-store");
|
||||
@@ -26,8 +17,8 @@ Sentry.init({
|
||||
ignoreErrors: [
|
||||
"SimpleURLLoaderWrapper",
|
||||
"Cannot read properties of null (reading 'webContents')",
|
||||
"EBUSY: resource busy or locked",
|
||||
],
|
||||
"EBUSY: resource busy or locked"
|
||||
]
|
||||
});
|
||||
autoUpdater.autoDownload = true;
|
||||
|
||||
@@ -52,28 +43,28 @@ var menu = Menu.buildFromTemplate([
|
||||
click() {
|
||||
app.exit();
|
||||
app.relaunch();
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Clear Settings",
|
||||
click() {
|
||||
store.reset("filePaths");
|
||||
mainWindow.webContents.session.clearStorageData();
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Sign Out",
|
||||
click() {
|
||||
mainWindow.webContents.send(ipcTypes.app.toRenderer.signOut);
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Exit",
|
||||
click() {
|
||||
app.quit();
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
]
|
||||
// Other code removed for brevity
|
||||
},
|
||||
{
|
||||
@@ -83,13 +74,13 @@ var menu = Menu.buildFromTemplate([
|
||||
label: "Rescue",
|
||||
click() {
|
||||
shell.openExternal("http://imexrescue.com");
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: `Check for Updates (currently ${app.getVersion()})`,
|
||||
click() {
|
||||
checkForUpdates();
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: `Show Release Notes`,
|
||||
@@ -98,28 +89,28 @@ var menu = Menu.buildFromTemplate([
|
||||
ipcTypes.app.toRenderer.setReleaseNotes,
|
||||
require("./changelog.json")[app.getVersion()]
|
||||
);
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Open Config File",
|
||||
click() {
|
||||
shell.openPath(store.path);
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Open Log File",
|
||||
click() {
|
||||
shell.openPath(path.join(app.getPath("appData"), "ImeX RPS\\logs"));
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Third Party Notices",
|
||||
click() {
|
||||
openNoticeWindow();
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]);
|
||||
|
||||
let mainWindow;
|
||||
@@ -142,8 +133,8 @@ function createWindow() {
|
||||
webSecurity: true,
|
||||
worldSafeExecuteJavaScript: true,
|
||||
contextIsolation: true,
|
||||
preload: path.join(__dirname, "preload.js"), // use a preload script
|
||||
},
|
||||
preload: path.join(__dirname, "preload.js") // use a preload script
|
||||
}
|
||||
});
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
@@ -162,11 +153,7 @@ function createWindow() {
|
||||
|
||||
// and load the index.html of the app.
|
||||
// win.loadFile("index.html");
|
||||
mainWindow.loadURL(
|
||||
isDev
|
||||
? "http://localhost:3000"
|
||||
: `file://${path.join(__dirname, "/../build/index.html")}`
|
||||
);
|
||||
mainWindow.loadURL(isDev ? "http://localhost:3000" : `file://${path.join(__dirname, "/../build/index.html")}`);
|
||||
|
||||
// mainWindow.on("close", function (event) {
|
||||
// event.preventDefault();
|
||||
@@ -256,15 +243,15 @@ function createTray() {
|
||||
label: "Show",
|
||||
click: function () {
|
||||
mainWindow.show();
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Exit",
|
||||
click: function () {
|
||||
app.isQuiting = true;
|
||||
app.quit();
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
appIcon.on("double-click", function (event) {
|
||||
@@ -297,7 +284,7 @@ function openNoticeWindow() {
|
||||
noticeWindow = new BrowserWindow({
|
||||
height: 600,
|
||||
width: 800,
|
||||
title: "ImEX RPS - Third Party Notices",
|
||||
title: "ImEX RPS - Third Party Notices"
|
||||
});
|
||||
|
||||
noticeWindow.loadURL("file://" + __dirname + "/licenses.txt");
|
||||
@@ -333,7 +320,7 @@ autoUpdater.on("update-downloaded", (ev, info) => {
|
||||
// if (process.env.NODE_ENV === "production") {
|
||||
mainWindow.webContents.send(ipcTypes.app.toRenderer.downloadProgress, {
|
||||
...ev,
|
||||
percent: 100,
|
||||
percent: 100
|
||||
});
|
||||
|
||||
dialog
|
||||
@@ -341,7 +328,7 @@ autoUpdater.on("update-downloaded", (ev, info) => {
|
||||
type: "info",
|
||||
title: "ImeX RPS Update Manager",
|
||||
message: `ImEX RPS is ready to update to Version ${ev.version}. It is highly recommended that you update immediately. Would you like to update now? RPS will automatically restart.`,
|
||||
buttons: ["Yes", "No"],
|
||||
buttons: ["Yes", "No"]
|
||||
})
|
||||
.then(({ response }) => {
|
||||
if (response === 0) {
|
||||
|
||||
Reference in New Issue
Block a user