Add report scrub issue page.
This commit is contained in:
@@ -40,17 +40,16 @@ async function ScrubEstimate({ job }) {
|
||||
let estimateScrubberUrl;
|
||||
switch (currentChannel) {
|
||||
case "alpha":
|
||||
estimateScrubberUrl = "https://4284-79287.el-alt.com/api/sendems"; //dev specific URL.
|
||||
estimateScrubberUrl = "https://4284-79287.el-alt.com"; //dev specific URL.
|
||||
break;
|
||||
case "beta":
|
||||
estimateScrubberUrl = "https://4284-79073.el-alt.com/api/sendems"; //Beta specific URL.
|
||||
estimateScrubberUrl = "https://4284-79073.el-alt.com"; //Beta specific URL.
|
||||
break;
|
||||
default:
|
||||
estimateScrubberUrl = "https://insurtechtoolkit.com/api/sendems"; //Production route.
|
||||
estimateScrubberUrl = "https://insurtechtoolkit.com"; //Production route.
|
||||
break;
|
||||
}
|
||||
|
||||
//const estimateScrubberUrl = "https://insurtechtoolkit.com/api/sendems";
|
||||
log.log(`Estimate Scrubber URL: [${currentChannel} |`, estimateScrubberUrl);
|
||||
const sendingEntityId = "87330f61-412b-4251-baaa-d026565b23c5";
|
||||
try {
|
||||
@@ -117,7 +116,7 @@ async function ScrubEstimate({ job }) {
|
||||
const jsonString = JSON.stringify(job);
|
||||
formData.append("file", new Blob([jsonString], { type: "application/json" }), `${fileName}.json`);
|
||||
|
||||
const result = await axios.post(estimateScrubberUrl, formData, {
|
||||
const result = await axios.post(`${estimateScrubberUrl}/api/sendems`, formData, {
|
||||
auth: {
|
||||
username: basicAuthUser,
|
||||
password: basicAuthpassword
|
||||
@@ -126,13 +125,14 @@ async function ScrubEstimate({ job }) {
|
||||
});
|
||||
|
||||
const resultPDFUrl = result?.data?.report_link;
|
||||
|
||||
const reportIssueUrl = `${estimateScrubberUrl}/pcontactUs.aspx?apiKey=${esApiKey}&file=${fileName}.json`
|
||||
// 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,
|
||||
pdfUrl: resultPDFUrl
|
||||
pdfUrl: resultPDFUrl,
|
||||
reportIssueUrl
|
||||
});
|
||||
|
||||
// const pdfWindow = new BrowserWindow({
|
||||
|
||||
Reference in New Issue
Block a user