From bb4e671c83c498304b04c57d501266d970094721 Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 9 Dec 2025 17:13:59 -0500 Subject: [PATCH 1/2] feature/IO-3461-Fix-Eula --- client/src/App/App.jsx | 2 +- client/src/components/eula/eula.component.jsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/App/App.jsx b/client/src/App/App.jsx index ea3be8f5a..e14162274 100644 --- a/client/src/App/App.jsx +++ b/client/src/App/App.jsx @@ -138,7 +138,7 @@ export function App({ ); } - if (currentEula && !currentUser.eulaIsAccepted) { + if (!isPartsEntry && currentEula && !currentUser.eulaIsAccepted) { return ; } diff --git a/client/src/components/eula/eula.component.jsx b/client/src/components/eula/eula.component.jsx index f21824388..f5d6ea8fc 100644 --- a/client/src/components/eula/eula.component.jsx +++ b/client/src/components/eula/eula.component.jsx @@ -55,7 +55,8 @@ const Eula = ({ currentEula, currentUser, acceptEula }) => { const useremail = currentUser.email; try { - const { ...otherFormValues } = formValues; + // eslint-disable-next-line no-unused-vars + const { accepted_terms, ...otherFormValues } = formValues; // Trim the values of the fields before submitting const trimmedFormValues = Object.entries(otherFormValues).reduce((acc, [key, value]) => { From 35a566cbe5281c79e9cd1a6b922b40eea4c06490 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Wed, 10 Dec 2025 09:52:04 -0800 Subject: [PATCH 2/2] IO-3462 Project Mexico Mod Signed-off-by: Allan Carr --- server/data/carfax-rps.js | 52 ++++++++++++++++++----------------- server/data/carfax.js | 58 ++++++++++++++++++++------------------- 2 files changed, 57 insertions(+), 53 deletions(-) diff --git a/server/data/carfax-rps.js b/server/data/carfax-rps.js index fd8f634a1..7c7eecb62 100644 --- a/server/data/carfax-rps.js +++ b/server/data/carfax-rps.js @@ -117,44 +117,46 @@ async function processShopData(shopsToProcess, start, end, skipUpload, ignoreDat imexshopid: shopid, json: JSON.stringify(carfaxObject, null, 2), filename: `${shopid}_${moment().format("DDMMYYYY_HHMMss")}.json`, - count: carfaxObject.job.length + count: carfaxObject?.job?.length || 0 }; if (skipUpload) { fs.writeFileSync(`./logs/${jsonObj.filename}`, jsonObj.json); uploadToS3(jsonObj, S3_BUCKET_NAME); } else { - await uploadViaSFTP(jsonObj); + if (jsonObj.count > 0) { + await uploadViaSFTP(jsonObj); - await sendMexicoBillingEmail({ - subject: `${shopid.replace(/_/g, "").toUpperCase()}_MexicoRPS_${moment().format("MMDDYYYY")} ROs ${jsonObj.count} Error ${errorCode(jsonObj)}`, - text: `Errors:\n${JSON.stringify( - erroredJobs.map((ej) => ({ - jobid: ej.job?.id, - error: ej.error - })), - null, - 2 - )}\n\nUploaded:\n${JSON.stringify( - { - bodyshopid: bodyshop.id, - imexshopid: shopid, - count: jsonObj.count, - filename: jsonObj.filename, - result: jsonObj.result - }, - null, - 2 - )}` - }); + await sendMexicoBillingEmail({ + subject: `${shopid.replace(/_/g, "").toUpperCase()}_MexicoRPS_${moment().format("MMDDYYYY")} ROs ${jsonObj.count} Error ${errorCode(jsonObj)}`, + text: `Errors:\n${JSON.stringify( + erroredJobs.map((ej) => ({ + jobid: ej.job?.id, + error: ej.error + })), + null, + 2 + )}\n\nUploaded:\n${JSON.stringify( + { + bodyshopid: bodyshop.id, + imexshopid: shopid, + count: jsonObj.count, + filename: jsonObj.filename, + result: jsonObj.result + }, + null, + 2 + )}` + }); + } } - allJSONResults.push({ + jsonObj.count > 0 && allJSONResults.push({ bodyshopid: bodyshop.id, imexshopid: shopid, count: jsonObj.count, filename: jsonObj.filename, - result: jsonObj.result + result: jsonObj.result || "No Upload Result Available" }); logger.log("CARFAX-RPS-end-shop-extract", "DEBUG", "api", bodyshop.id, { diff --git a/server/data/carfax.js b/server/data/carfax.js index 1424dea4f..250d553bb 100644 --- a/server/data/carfax.js +++ b/server/data/carfax.js @@ -160,40 +160,42 @@ async function processShopData(shopsToProcess, start, end, skipUpload, ignoreDat imexshopid: shopid, json: JSON.stringify(carfaxObject, null, 2), filename: `${shopid}_${moment().format("DDMMYYYY_HHMMss")}.json`, - count: carfaxObject.job.length + count: carfaxObject?.job?.length || 0 }; if (skipUpload) { fs.writeFileSync(`./logs/${jsonObj.filename}`, jsonObj.json); uploadToS3(jsonObj); } else { - await uploadViaSFTP(jsonObj); + if (jsonObj.count > 0) { + await uploadViaSFTP(jsonObj); - await sendMexicoBillingEmail({ - subject: `${shopid.replace(/_/g, "").toUpperCase()}_Mexico${InstanceManager({ - imex: "IO", - rome: "RO" - })}_${moment().format("MMDDYYYY")} ROs ${jsonObj.count} Error ${errorCode(jsonObj)}`, - text: `Errors:\n${JSON.stringify( - erroredJobs.map((ej) => ({ - ro_number: ej.job?.ro_number, - jobid: ej.job?.id, - error: ej.error - })), - null, - 2 - )}\n\nUploaded:\n${JSON.stringify( - { - bodyshopid: bodyshop.id, - imexshopid: shopid, - count: jsonObj.count, - filename: jsonObj.filename, - result: jsonObj.result - }, - null, - 2 - )}` - }); + await sendMexicoBillingEmail({ + subject: `${shopid.replace(/_/g, "").toUpperCase()}_Mexico${InstanceManager({ + imex: "IO", + rome: "RO" + })}_${moment().format("MMDDYYYY")} ROs ${jsonObj.count} Error ${errorCode(jsonObj)}`, + text: `Errors:\n${JSON.stringify( + erroredJobs.map((ej) => ({ + ro_number: ej.job?.ro_number, + jobid: ej.job?.id, + error: ej.error + })), + null, + 2 + )}\n\nUploaded:\n${JSON.stringify( + { + bodyshopid: bodyshop.id, + imexshopid: shopid, + count: jsonObj.count, + filename: jsonObj.filename, + result: jsonObj.result + }, + null, + 2 + )}` + }); + } } allJSONResults.push({ @@ -201,7 +203,7 @@ async function processShopData(shopsToProcess, start, end, skipUpload, ignoreDat imexshopid: shopid, count: jsonObj.count, filename: jsonObj.filename, - result: jsonObj.result + result: jsonObj.result || "No Upload Result Available" }); logger.log("CARFAX-end-shop-extract", "DEBUG", "api", bodyshop.id, {