diff --git a/client/src/components/labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component.jsx b/client/src/components/labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component.jsx index 8c63e73a2..c26f78983 100644 --- a/client/src/components/labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component.jsx +++ b/client/src/components/labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component.jsx @@ -17,8 +17,10 @@ export default function LaborAllocationsAdjustmentEdit({ mod_lbr_ty, adjustments, children, + refetchQueryNames, }) { const [loading, setLoading] = useState(false); + const [visible, setVisible] = useState(false); const [updateAdjustments] = useMutation(UPDATE_JOB); const [form] = Form.useForm(); @@ -36,6 +38,7 @@ export default function LaborAllocationsAdjustmentEdit({ }, }, }, + ...(refetchQueryNames ? { refetchQueries: refetchQueryNames } : {}), }); if (!!result.errors) { @@ -50,6 +53,7 @@ export default function LaborAllocationsAdjustmentEdit({ }); } setLoading(false); + setVisible(false); }; const overlay = ( @@ -140,7 +144,12 @@ export default function LaborAllocationsAdjustmentEdit({ ); return ( - + setVisible(vis)} + content={overlay} + trigger="click" + > {children} ); diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx index 63c2df033..395169d6f 100644 --- a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx +++ b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx @@ -91,6 +91,7 @@ export function LaborAllocationsTable({ jobId={jobId} adjustments={adjustments} mod_lbr_ty={record.opcode} + refetchQueryNames={["GET_LINE_TICKET_BY_PK"]} > @@ -122,7 +123,6 @@ export function LaborAllocationsTable({ setState({ ...state, filteredInfo: filters, sortedInfo: sorter }); }; - console.log("totals :>> ", totals); return (