Begin Audit Functionality testing.
This commit is contained in:
@@ -5,8 +5,9 @@ import {
|
||||
setUpdateAvailable,
|
||||
setUpdateProgress,
|
||||
setWatchedPaths,
|
||||
setWatcherStatus,
|
||||
setWatcherStatus
|
||||
} from "../redux/application/application.actions";
|
||||
import { calculateAudit } from "../redux/reporting/reporting.actions";
|
||||
import { setScanEstimateList } from "../redux/scan/scan.actions";
|
||||
import { store } from "../redux/store";
|
||||
import { signOutStart } from "../redux/user/user.actions";
|
||||
@@ -18,96 +19,65 @@ ipcRenderer.on("test-toRenderer", (event, obj) => {
|
||||
console.log("test-toRenderer", obj);
|
||||
});
|
||||
|
||||
ipcRenderer.on(
|
||||
ipcTypes.fileWatcher.toRenderer.filepathsList,
|
||||
(event, obj) => {
|
||||
store.dispatch(setWatchedPaths(obj));
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.fileWatcher.toRenderer.filepathsList, (event, obj) => {
|
||||
store.dispatch(setWatchedPaths(obj));
|
||||
});
|
||||
|
||||
//Filewatcher Status Section
|
||||
ipcRenderer.on(
|
||||
ipcTypes.fileWatcher.toRenderer.startSuccess,
|
||||
(event, obj) => {
|
||||
store.dispatch(setWatcherStatus("Started"));
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(
|
||||
ipcTypes.fileWatcher.toRenderer.stopSuccess,
|
||||
(event, obj) => {
|
||||
store.dispatch(setWatcherStatus("Stopped"));
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.fileWatcher.toRenderer.startSuccess, (event, obj) => {
|
||||
store.dispatch(setWatcherStatus("Started"));
|
||||
});
|
||||
ipcRenderer.on(ipcTypes.fileWatcher.toRenderer.stopSuccess, (event, obj) => {
|
||||
store.dispatch(setWatcherStatus("Stopped"));
|
||||
});
|
||||
ipcRenderer.on(ipcTypes.fileWatcher.toRenderer.error, (event, obj) => {
|
||||
store.dispatch(setWatcherStatus(obj));
|
||||
});
|
||||
|
||||
//Estimate Section
|
||||
ipcRenderer.on(
|
||||
ipcTypes.estimate.toRenderer.getCloseDate,
|
||||
async (event, { filepath, clm_no }) => {
|
||||
const close_date = await GetR4PDateWithClaim(clm_no);
|
||||
ipcRenderer.send(ipcTypes.app.toMain.importJob, {
|
||||
filepath,
|
||||
close_date,
|
||||
});
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.estimate.toRenderer.getCloseDate, async (event, { filepath, clm_no }) => {
|
||||
const close_date = await GetR4PDateWithClaim(clm_no);
|
||||
ipcRenderer.send(ipcTypes.app.toMain.importJob, {
|
||||
filepath,
|
||||
close_date
|
||||
});
|
||||
});
|
||||
|
||||
ipcRenderer.on(
|
||||
ipcTypes.estimate.toRenderer.estimateDecodeSuccess,
|
||||
async (event, obj) => {
|
||||
await UpsertEstimate(obj);
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.estimate.toRenderer.estimateDecodeSuccess, async (event, obj) => {
|
||||
await UpsertEstimate(obj);
|
||||
});
|
||||
|
||||
ipcRenderer.on(ipcTypes.store.response, (event, obj) => {
|
||||
store.dispatch(setSettings(obj));
|
||||
});
|
||||
|
||||
//FileScan Section
|
||||
ipcRenderer.on(
|
||||
ipcTypes.fileScan.toRenderer.scanFilePathsResponse,
|
||||
async (event, listOfEstimates) => {
|
||||
store.dispatch(setScanEstimateList(listOfEstimates));
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.fileScan.toRenderer.scanFilePathsResponse, async (event, listOfEstimates) => {
|
||||
store.dispatch(setScanEstimateList(listOfEstimates));
|
||||
});
|
||||
|
||||
ipcRenderer.on(
|
||||
ipcTypes.app.toRenderer.updateAvailable,
|
||||
async (event, updateInfo) => {
|
||||
store.dispatch(setUpdateAvailable(updateInfo));
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.app.toRenderer.updateAvailable, async (event, updateInfo) => {
|
||||
store.dispatch(setUpdateAvailable(updateInfo));
|
||||
});
|
||||
|
||||
ipcRenderer.on(
|
||||
ipcTypes.app.toRenderer.downloadProgress,
|
||||
async (event, progress) => {
|
||||
store.dispatch(setUpdateProgress(progress));
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.app.toRenderer.downloadProgress, async (event, progress) => {
|
||||
store.dispatch(setUpdateProgress(progress));
|
||||
});
|
||||
|
||||
ipcRenderer.on(
|
||||
ipcTypes.app.toRenderer.signOut,
|
||||
async (event, progress) => {
|
||||
store.dispatch(signOutStart());
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.app.toRenderer.signOut, async (event, progress) => {
|
||||
store.dispatch(signOutStart());
|
||||
});
|
||||
|
||||
ipcRenderer.on(
|
||||
ipcTypes.app.toRenderer.setReleaseNotes,
|
||||
async (event, releaseNotes) => {
|
||||
store.dispatch(setReleaseNotes(releaseNotes));
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.app.toRenderer.setReleaseNotes, async (event, releaseNotes) => {
|
||||
store.dispatch(setReleaseNotes(releaseNotes));
|
||||
});
|
||||
|
||||
ipcRenderer.on(
|
||||
ipcTypes.app.toRenderer.appVersion,
|
||||
async (event, appversion) => {
|
||||
window.$crisp.push([
|
||||
"set",
|
||||
"session:data",
|
||||
[[["rps-version", appversion]]],
|
||||
]);
|
||||
}
|
||||
);
|
||||
ipcRenderer.on(ipcTypes.app.toRenderer.appVersion, async (event, appversion) => {
|
||||
window.$crisp.push(["set", "session:data", [[["rps-version", appversion]]]]);
|
||||
});
|
||||
|
||||
//HAndle Autdit
|
||||
|
||||
ipcRenderer.on(ipcTypes.audit.toRenderer.auditClaimsArray, async (event, claimsArray) => {
|
||||
store.dispatch(calculateAudit(claimsArray));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user