ES Cleanup

This commit is contained in:
Patrick Fic
2025-09-04 09:44:21 -07:00
parent b90fe00078
commit cf9c237235
7 changed files with 108 additions and 74 deletions

View File

@@ -86,7 +86,7 @@ async function ScrubEstimate({ job }) {
});
}
const fileName = `RPSTest-${job.id}-${Date.now()}`;
const fileName = `RPS-Scrub-${job.id}-${job.clm_no}-${Date.now()}`;
// Write job object to logs subfolder
try {
@@ -110,22 +110,23 @@ async function ScrubEstimate({ job }) {
const resultPDFUrl = result?.data?.report_link
log.log("Estimate Scrubber Result:", result.data, resultPDFUrl);
// log.log("Estimate Scrubber Result:", result.data, resultPDFUrl);
const b = BrowserWindow.getAllWindows()[0];
b.webContents.send(ipcTypes.app.toRenderer.scrubResults, {
jobid: job.id,
items: result.data?.identified_item
items: result.data?.identified_item,
pdfUrl: resultPDFUrl
});
const pdfWindow = new BrowserWindow({
// const pdfWindow = new BrowserWindow({
webPreferences: {
plugins: true, // Enable PDF viewing
},
});
// webPreferences: {
// plugins: true, // Enable PDF viewing
// },
// });
pdfWindow.loadURL(resultPDFUrl);
pdfWindow.focus();
// pdfWindow.loadURL(resultPDFUrl);
// pdfWindow.focus();
return resultPDFUrl
}
exports.ScrubEstimate = ScrubEstimate