diff --git a/src/ipc/ipc-estimate-utils.js b/src/ipc/ipc-estimate-utils.js index 864a6cd..3c85b23 100644 --- a/src/ipc/ipc-estimate-utils.js +++ b/src/ipc/ipc-estimate-utils.js @@ -47,11 +47,12 @@ export async function UpsertEstimate(job) { }); 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 }, + refetchQueries: ["QUERY_JOB_BY_PK"], }); logger.info("Job updated succesfully."); } else { @@ -62,7 +63,7 @@ export async function UpsertEstimate(job) { variables: { job: { ...job, bodyshopid: shopId }, }, - refetchQueries: ["QUERY_ALL_JOBS_PAGINATED"], + refetchQueries: ["QUERY_ALL_JOBS_PAGINATED", "QUERY_JOB_BY_PK"], }); logger.info("Job inserted succesfully."); }