From 53cb1d2f65a24f823c688db96f0bc8602461d2f0 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 23 Jan 2026 12:54:20 -0500 Subject: [PATCH] feature/IO-3499-React-19 - The Calculate button on Totals did not actually have refetch passed down --- .../job-calculate-totals.component.jsx | 23 ------------------- .../job-totals-table.component.jsx | 9 +++++--- .../jobs-detail-totals.component.jsx | 2 +- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/client/src/components/job-calculate-totals/job-calculate-totals.component.jsx b/client/src/components/job-calculate-totals/job-calculate-totals.component.jsx index 104155c48..f8d11d99f 100644 --- a/client/src/components/job-calculate-totals/job-calculate-totals.component.jsx +++ b/client/src/components/job-calculate-totals/job-calculate-totals.component.jsx @@ -18,29 +18,6 @@ export default function JobCalculateTotals({ job, disabled, refetch }) { }); if (refetch) refetch(); - // const result = await updateJob({ - // refetchQueries: ["GET_JOB_BY_PK"], - // awaitRefetchQueries: true, - // variables: { - // jobId: job.id, - // job: { - // job_totals: newTotals, - // clm_total: Dinero(newTotals.totals.total_repairs).toFormat("0.00"), - // owner_owing: Dinero(newTotals.totals.custPayable.total).toFormat( - // "0.00" - // ), - // }, - // }, - // }); - // if (!!!result.errors) { - // notification["success"]({ message: t("jobs.successes.updated") }); - // } else { - // notification.error({ - // message: t("jobs.errors.updating", { - // error: JSON.stringify(result.errors), - // }), - // }); - // } } catch (error) { notification.error({ title: t("jobs.errors.updating", { diff --git a/client/src/components/job-totals-table/job-totals-table.component.jsx b/client/src/components/job-totals-table/job-totals-table.component.jsx index ecc8a48a8..688a6ef39 100644 --- a/client/src/components/job-totals-table/job-totals-table.component.jsx +++ b/client/src/components/job-totals-table/job-totals-table.component.jsx @@ -21,13 +21,16 @@ const colSpan = { lg: { span: 12 } }; -export function JobsTotalsTableComponent({ jobRO, currentUser, job }) { +export function JobsTotalsTableComponent({ jobRO, currentUser, job, refetch }) { const { t } = useTranslation(); if (!job.job_totals) { return ( - } /> + } + /> ); } @@ -64,7 +67,7 @@ export function JobsTotalsTableComponent({ jobRO, currentUser, job }) { {(currentUser.email.includes("@imex.") || currentUser.email.includes("@rome.")) && ( - + - +