feature/IO-3702-ESPD-UI-AND-FIXES - Stage 2
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { platform } from "@electron-toolkit/utils";
|
||||
import { UUID } from "crypto";
|
||||
import { Notification, shell } from "electron";
|
||||
import log from "electron-log/main";
|
||||
import fs from "fs";
|
||||
import _ from "lodash";
|
||||
@@ -38,6 +37,7 @@ import { DecodedVeh } from "./decode-veh.interface";
|
||||
import UploadEmsToS3 from "./emsbackup";
|
||||
import getMainWindow from "../../util/getMainWindow";
|
||||
import newWindow from "../../util/newWindow";
|
||||
import { createNotification, showNotification } from "../util/notification";
|
||||
|
||||
async function ImportJob(filepath: string): Promise<void> {
|
||||
const parsedFilePath = path.parse(filepath);
|
||||
@@ -151,7 +151,7 @@ async function ImportJob(filepath: string): Promise<void> {
|
||||
});
|
||||
setAppProgressbar(-1);
|
||||
|
||||
const uploadNotification = new Notification({
|
||||
const uploadNotification = createNotification({
|
||||
title: "Job Scrubbed",
|
||||
body: `${newAvailableJob.ownr_name} - ${newAvailableJob.vehicle_info}.`,
|
||||
actions: [
|
||||
@@ -175,12 +175,10 @@ async function ImportJob(filepath: string): Promise<void> {
|
||||
uploadNotification.show();
|
||||
} catch (error) {
|
||||
log.error("Error encountered while decoding job. ", errorTypeCheck(error));
|
||||
const uploadNotificationFailure = new Notification({
|
||||
showNotification({
|
||||
title: "Job Scrub Failure",
|
||||
body: errorTypeCheck(error).message, //TODO: Remove after debug.
|
||||
});
|
||||
|
||||
uploadNotificationFailure.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,6 +201,7 @@ export interface RawJobDataObject
|
||||
DecodedPfp {
|
||||
vehicleid?: UUID;
|
||||
shopid: UUID;
|
||||
source_system?: string | null;
|
||||
}
|
||||
|
||||
export interface AvailableJobSchema {
|
||||
|
||||
Reference in New Issue
Block a user