Alpha 7 release. Includes file link from ES.

This commit is contained in:
Patrick Fic
2025-08-22 07:51:09 -07:00
parent 5a4970c440
commit be12e94234
3 changed files with 13 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ const log = require("electron-log");
const axios = require("axios");
const { path } = require("path");
const { BrowserWindow } = require("electron");
const { default: ipcTypes } = require("../../src/ipc.types.commonjs");
// Function to write job object to logs subfolder
async function writeJobToLogsFolder(job, fileName) {
@@ -30,7 +31,7 @@ async function writeJobToLogsFolder(job, fileName) {
async function ScrubEstimate({ job }) {
//These are hard coded as they are not secure values and checking happens based on other values.
//No secret or private information is exposed.
const basicAuthUser = "Imex";
const basicAuthUser = "Imex2";
const basicAuthpassword = "Patrick";
const estimateScrubberUrl = "https://insurtechtoolkit.com/api/sendems";
const sendingEntityId = '87330f61-412b-4251-baaa-d026565b23c5'
@@ -103,10 +104,17 @@ async function ScrubEstimate({ job }) {
},
headers: formData.getHeaders ? formData.getHeaders() : {}
});
console.log("*** ~ ScrubEstimate ~ result:", result);
const resultPDFUrl = result?.data?.[0] || `https://www.insurtechtoolkit.com/analysis/${fileName}.pdf`;
const resultPDFUrl = result?.data?.report_link
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
});
const pdfWindow = new BrowserWindow({
webPreferences: {