ES Cleanup
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user