Working ANTD5 and major updates without DayJS

This commit is contained in:
Patrick Fic
2024-04-18 09:29:00 -07:00
parent e1e29f8a4d
commit 79a0881f5a
45 changed files with 5519 additions and 13202 deletions

View File

@@ -31,7 +31,7 @@ export function CalculateVehicleAge(job) {
if (closeDate.isSameOrAfter(moment("2023-04-01"))) {
//Post April 2023 rules where the age is calculated based on loss date.
ipcRenderer.send(
ipcTypes.default.app.toMain.log.debug,
ipcTypes.app.toMain.log.debug,
"Using post 0423 ruleset to calculate vehicle age for job.",
job
);
@@ -39,7 +39,7 @@ export function CalculateVehicleAge(job) {
} else {
//Pre-April 2023 rules where the age was calculated based on model year, not loss date.
ipcRenderer.send(
ipcTypes.default.app.toMain.log.debug,
ipcTypes.app.toMain.log.debug,
"Using pre 0423 ruleset to calculate vehicle age for job.",
job
);
@@ -62,7 +62,7 @@ export async function UpsertEstimate(job) {
//logger.info("Beginning Upserting job from Renderer.");
console.log("WINDOW IPCS", ipcRenderer);
ipcRenderer.send(
ipcTypes.default.app.toMain.log.info,
ipcTypes.app.toMain.log.info,
"Beginning Upserting job from Renderer."
);
const existingJobs = await client.query({

View File

@@ -19,7 +19,7 @@ ipcRenderer.on("test-toRenderer", (event, obj) => {
});
ipcRenderer.on(
ipcTypes.default.fileWatcher.toRenderer.filepathsList,
ipcTypes.fileWatcher.toRenderer.filepathsList,
(event, obj) => {
store.dispatch(setWatchedPaths(obj));
}
@@ -27,27 +27,27 @@ ipcRenderer.on(
//Filewatcher Status Section
ipcRenderer.on(
ipcTypes.default.fileWatcher.toRenderer.startSuccess,
ipcTypes.fileWatcher.toRenderer.startSuccess,
(event, obj) => {
store.dispatch(setWatcherStatus("Started"));
}
);
ipcRenderer.on(
ipcTypes.default.fileWatcher.toRenderer.stopSuccess,
ipcTypes.fileWatcher.toRenderer.stopSuccess,
(event, obj) => {
store.dispatch(setWatcherStatus("Stopped"));
}
);
ipcRenderer.on(ipcTypes.default.fileWatcher.toRenderer.error, (event, obj) => {
ipcRenderer.on(ipcTypes.fileWatcher.toRenderer.error, (event, obj) => {
store.dispatch(setWatcherStatus(obj));
});
//Estimate Section
ipcRenderer.on(
ipcTypes.default.estimate.toRenderer.getCloseDate,
ipcTypes.estimate.toRenderer.getCloseDate,
async (event, { filepath, clm_no }) => {
const close_date = await GetR4PDateWithClaim(clm_no);
ipcRenderer.send(ipcTypes.default.app.toMain.importJob, {
ipcRenderer.send(ipcTypes.app.toMain.importJob, {
filepath,
close_date,
});
@@ -55,54 +55,54 @@ ipcRenderer.on(
);
ipcRenderer.on(
ipcTypes.default.estimate.toRenderer.estimateDecodeSuccess,
ipcTypes.estimate.toRenderer.estimateDecodeSuccess,
async (event, obj) => {
await UpsertEstimate(obj);
}
);
ipcRenderer.on(ipcTypes.default.store.response, (event, obj) => {
ipcRenderer.on(ipcTypes.store.response, (event, obj) => {
store.dispatch(setSettings(obj));
});
//FileScan Section
ipcRenderer.on(
ipcTypes.default.fileScan.toRenderer.scanFilePathsResponse,
ipcTypes.fileScan.toRenderer.scanFilePathsResponse,
async (event, listOfEstimates) => {
store.dispatch(setScanEstimateList(listOfEstimates));
}
);
ipcRenderer.on(
ipcTypes.default.app.toRenderer.updateAvailable,
ipcTypes.app.toRenderer.updateAvailable,
async (event, updateInfo) => {
store.dispatch(setUpdateAvailable(updateInfo));
}
);
ipcRenderer.on(
ipcTypes.default.app.toRenderer.downloadProgress,
ipcTypes.app.toRenderer.downloadProgress,
async (event, progress) => {
store.dispatch(setUpdateProgress(progress));
}
);
ipcRenderer.on(
ipcTypes.default.app.toRenderer.signOut,
ipcTypes.app.toRenderer.signOut,
async (event, progress) => {
store.dispatch(signOutStart());
}
);
ipcRenderer.on(
ipcTypes.default.app.toRenderer.setReleaseNotes,
ipcTypes.app.toRenderer.setReleaseNotes,
async (event, releaseNotes) => {
store.dispatch(setReleaseNotes(releaseNotes));
}
);
ipcRenderer.on(
ipcTypes.default.app.toRenderer.appVersion,
ipcTypes.app.toRenderer.appVersion,
async (event, appversion) => {
window.$crisp.push([
"set",