From bf9fc128cd1e3514ba98fcd10254a8db24c82fbd Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Tue, 5 Mar 2024 15:13:40 -0500 Subject: [PATCH] - Fix for IO-2540 Signed-off-by: Dave Richer --- .../production-list-columns.add.component.jsx | 2 ++ .../production-list-columns.data.js | 7 +++++-- .../production-list-columns.empassignment.component.jsx | 7 +++++++ .../production-list-table-view-select.component.jsx | 3 +++ .../production-list-table.component.jsx | 3 +++ 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/client/src/components/production-list-columns/production-list-columns.add.component.jsx b/client/src/components/production-list-columns/production-list-columns.add.component.jsx index c6336f6f5..09e99625a 100644 --- a/client/src/components/production-list-columns/production-list-columns.add.component.jsx +++ b/client/src/components/production-list-columns/production-list-columns.add.component.jsx @@ -27,6 +27,7 @@ export function ProductionColumnsComponent({ bodyshop, data, tableState, + refetch, }) { const [columns, setColumns] = columnState; const {t} = useTranslation(); @@ -50,6 +51,7 @@ export function ProductionColumnsComponent({ data, state: tableState, activeStatuses: bodyshop.md_ro_statuses.active_statuses, + refetch, }); const menu = { diff --git a/client/src/components/production-list-columns/production-list-columns.data.js b/client/src/components/production-list-columns/production-list-columns.data.js index 04ccde31a..7c9e0a86f 100644 --- a/client/src/components/production-list-columns/production-list-columns.data.js +++ b/client/src/components/production-list-columns/production-list-columns.data.js @@ -26,7 +26,7 @@ import ProductionListColumnCategory from "./production-list-columns.status.categ import ProductionListColumnStatus from "./production-list-columns.status.component"; import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component"; -const r = ({technician, state, activeStatuses, data, bodyshop}) => { +const r = ({technician, state, activeStatuses, data, bodyshop, refetch}) => { return [ { title: i18n.t("jobs.actions.viewdetail"), @@ -473,6 +473,7 @@ const r = ({technician, state, activeStatuses, data, bodyshop}) => { ), render: (text, record) => ( @@ -493,6 +494,7 @@ const r = ({technician, state, activeStatuses, data, bodyshop}) => { render: (text, record) => ( ), @@ -509,7 +511,7 @@ const r = ({technician, state, activeStatuses, data, bodyshop}) => { bodyshop.employees?.find((e) => e.id === b.employee_csr)?.first_name ), render: (text, record) => ( - + ), }, { @@ -529,6 +531,7 @@ const r = ({technician, state, activeStatuses, data, bodyshop}) => { render: (text, record) => ( ), diff --git a/client/src/components/production-list-columns/production-list-columns.empassignment.component.jsx b/client/src/components/production-list-columns/production-list-columns.empassignment.component.jsx index d03e92fe0..fd2a67ac0 100644 --- a/client/src/components/production-list-columns/production-list-columns.empassignment.component.jsx +++ b/client/src/components/production-list-columns/production-list-columns.empassignment.component.jsx @@ -33,6 +33,7 @@ export function ProductionListEmpAssignment({ insertAuditTrail, bodyshop, record, + refetch, type, }) { const {t} = useTranslation(); @@ -64,6 +65,9 @@ export function ProductionListEmpAssignment({ }), }); } + + await refetch(); + setLoading(false); }; const handleRemove = async (operation) => { @@ -89,6 +93,9 @@ export function ProductionListEmpAssignment({ }), }); } + + await refetch(); + setLoading(false); }; diff --git a/client/src/components/production-list-table/production-list-table-view-select.component.jsx b/client/src/components/production-list-table/production-list-table-view-select.component.jsx index eb219c812..a313ec8f1 100644 --- a/client/src/components/production-list-table/production-list-table-view-select.component.jsx +++ b/client/src/components/production-list-table/production-list-table-view-select.component.jsx @@ -18,6 +18,7 @@ const mapStateToProps = createStructuredSelector({ }); export function ProductionListTable({ + refetch, bodyshop, technician, currentUser, @@ -38,6 +39,7 @@ export function ProductionListTable({ return { ...ProductionListColumns({ bodyshop, + refetch, technician, state, data: data, @@ -95,6 +97,7 @@ export function ProductionListTable({ ...ProductionListColumns({ technician, state, + refetch, data: data, activeStatuses: bodyshop.md_ro_statuses.active_statuses, }).find((e) => e.key === k.key), diff --git a/client/src/components/production-list-table/production-list-table.component.jsx b/client/src/components/production-list-table/production-list-table.component.jsx index 91c23a7fc..c99f662d4 100644 --- a/client/src/components/production-list-table/production-list-table.component.jsx +++ b/client/src/components/production-list-table/production-list-table.component.jsx @@ -64,6 +64,7 @@ export function ProductionListTable({loading, data, refetch, bodyshop, technicia return { ...ProductionListColumns({ bodyshop, + refetch, technician, state, data, @@ -84,6 +85,7 @@ export function ProductionListTable({loading, data, refetch, bodyshop, technicia ...ProductionListColumns({ bodyshop, technician, + refetch, state, data: data, activeStatuses: bodyshop.md_ro_statuses.active_statuses, @@ -262,6 +264,7 @@ export function ProductionListTable({loading, data, refetch, bodyshop, technicia state={state} setState={setState} setColumns={setColumns} + refetch={refetch} data={data} />