From d6a84b8b7f569bfa792be81e9bb41cab8226c883 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 24 Jan 2022 10:53:41 -0800 Subject: [PATCH 1/3] Remove autohouse testing. --- server/data/autohouse.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/data/autohouse.js b/server/data/autohouse.js index d4def25b8..78b5be34e 100644 --- a/server/data/autohouse.js +++ b/server/data/autohouse.js @@ -118,12 +118,12 @@ exports.default = async (req, res) => { } } - for (const xmlObj of allxmlsToUpload) { - fs.writeFileSync(`./logs/${xmlObj.filename}`, xmlObj.xml); - } + // for (const xmlObj of allxmlsToUpload) { + // fs.writeFileSync(`./logs/${xmlObj.filename}`, xmlObj.xml); + // } - res.json(allxmlsToUpload); - return; + // res.json(allxmlsToUpload); + // return; let sftp = new Client(); sftp.on("error", (errors) => From 5511dd44cef638a9b42a38b5b37b5d6efca87a90 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 24 Jan 2022 13:32:38 -0800 Subject: [PATCH 2/3] Autohouse - Export 1 --- server/data/autohouse.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server/data/autohouse.js b/server/data/autohouse.js index 78b5be34e..5ff98cff9 100644 --- a/server/data/autohouse.js +++ b/server/data/autohouse.js @@ -37,12 +37,15 @@ exports.default = async (req, res) => { //Query for the List of Bodyshop Clients. logger.log("autohouse-start", "DEBUG", "api", null, null); const { bodyshops } = await client.request(queries.GET_AUTOHOUSE_SHOPS); - 639; + const specificShopIds = req.body.bodyshopIds; // ['uuid] + const start = req.body.start; //YYYY-MM-DD const allxmlsToUpload = []; const allErrors = []; try { - for (const bodyshop of bodyshops) { + for (const bodyshop of specificShopIds + ? bodyshops.filter((b) => specificShopIds.includes(b.id)) + : bodyshops) { logger.log("autohouse-start-shop-extract", "DEBUG", "api", bodyshop.id, { shopname: bodyshop.shopname, }); @@ -52,7 +55,9 @@ exports.default = async (req, res) => { queries.AUTOHOUSE_QUERY, { bodyshopid: bodyshop.id, - start: moment().subtract(3, "days").startOf("day"), + start: start + ? moment(start).startOf("day") + : moment().subtract(3, "days").startOf("day"), } ); From 7ddd29ca276ca7bfb269bdafb1359ea15b935f65 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 24 Jan 2022 13:44:02 -0800 Subject: [PATCH 3/3] IO-1642 Resolve delivery invalid date on intake. --- .../job-checklist-form/job-checklist-form.component.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx b/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx index 049fa58dc..3940dea82 100644 --- a/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx +++ b/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx @@ -171,7 +171,7 @@ export function JobChecklistForm({ }); } }; - console.log(job,{ + console.log(job, { removeFromProduction: true, actual_completion: job && job.actual_completion && moment(job.actual_completion), @@ -212,7 +212,8 @@ export function JobChecklistForm({ 0) / bodyshop.target_touchtime, "days" )), - scheduled_delivery: job && moment(job.scheduled_delivery), + scheduled_delivery: + job.scheduled_delivery && moment(job.scheduled_delivery), }), ...(type === "deliver" && { removeFromProduction: true,