From 5b8bea3714706aa70b0b282361dace87e5e7e53f Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 19 Nov 2020 14:55:12 -0800 Subject: [PATCH] Preserve group on upsert RPS-49. --- src/ipc/ipc-estimate-utils.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/ipc/ipc-estimate-utils.js b/src/ipc/ipc-estimate-utils.js index fa0664c..864a6cd 100644 --- a/src/ipc/ipc-estimate-utils.js +++ b/src/ipc/ipc-estimate-utils.js @@ -16,13 +16,6 @@ export async function UpsertEstimate(job) { const shopId = store.getState().user.bodyshop.id; logger.info("Beginning Upserting job from Renderer."); const parsedYr = parseInt(job.v_model_yr); - logger.info( - "Job Loss Date", - job.loss_date, - "Parsed Year", - moment(job.loss_date).year() - - (parsedYr >= 0 ? 2000 + parsedYr : 1900 + parsedYr) - ); job = { ...job, @@ -46,14 +39,16 @@ export async function UpsertEstimate(job) { job.joblines.data ); - logger.info("Attemping to update job record."); + logger.info("Attemping to update job lines."); await client.mutate({ mutation: gql` ${suppDelta} `, }); delete job.joblines; - + delete job.group; //Added to preserve group already set in the system RPS-49. + + logger.info("Attemping to update job."); await client.mutate({ mutation: UPDATE_JOB, variables: { jobId: existingJobs.data.jobs[0].id, job: job },