Added vehicle groups and age calculations.
This commit is contained in:
@@ -11,7 +11,7 @@ const {
|
||||
|
||||
var watcher;
|
||||
|
||||
function StartWatcher() {
|
||||
async function StartWatcher() {
|
||||
const filePaths =
|
||||
store.get("filePaths").map((fp) => path.join(fp, "**.[eE][nN][vV]")) || [];
|
||||
console.log("StartWatcher -> filePaths", filePaths);
|
||||
@@ -26,8 +26,10 @@ function StartWatcher() {
|
||||
|
||||
if (watcher) {
|
||||
try {
|
||||
console.log("Trying to close watcher - it already existed.");
|
||||
watcher.close().then();
|
||||
console.log("Trying to close watcher - it already existed.111");
|
||||
await watcher.close();
|
||||
|
||||
console.log("Watcher closed successfully!");
|
||||
} catch (error) {
|
||||
console.log("Error trying to close Watcher.", error);
|
||||
}
|
||||
@@ -71,6 +73,7 @@ function StartWatcher() {
|
||||
// This event should be triggered everytime something happens.
|
||||
// console.log("Raw event info:", event, path, details);
|
||||
});
|
||||
|
||||
return filePaths;
|
||||
}
|
||||
|
||||
@@ -107,13 +110,21 @@ async function HandleNewFile(path) {
|
||||
result[key.toLowerCase()] = val;
|
||||
});
|
||||
|
||||
b.webContents.send(
|
||||
ipcTypes.default.estimate.toRenderer.estimateDecodeSuccess,
|
||||
newJobLow
|
||||
);
|
||||
if (newJobLow && newJob) {
|
||||
b.webContents.send(
|
||||
ipcTypes.default.estimate.toRenderer.estimateDecodeSuccess,
|
||||
newJobLow
|
||||
);
|
||||
|
||||
NewNotification({
|
||||
title: "Job Uploaded",
|
||||
body: "A new job has been uploaded.",
|
||||
}).show();
|
||||
NewNotification({
|
||||
title: "Job Uploaded",
|
||||
body: "A new job has been uploaded.",
|
||||
}).show();
|
||||
} else {
|
||||
NewNotification({
|
||||
title: "Job Ignored",
|
||||
body:
|
||||
"The job was not uploaded because it does not meet RPS requirements.",
|
||||
}).show();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user