From 947ded4b5e8d25e61e50f97e263f26612678eaa4 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Mon, 23 Feb 2026 18:20:57 -0800 Subject: [PATCH] IO-3573 Enhanced Payroll Labor Allocations Signed-off-by: Allan Carr --- .../time-ticket-modal.component.jsx | 51 +++++++++++++++---- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx index 35926e16c..b3e779f19 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx @@ -21,6 +21,7 @@ import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component"; import { HasRbacAccess } from "../rbac-wrapper/rbac-wrapper.component"; import TimeTicketList from "../time-ticket-list/time-ticket-list.component"; import JobEmployeeAssignmentsContainer from "./../job-employee-assignments/job-employee-assignments.container"; +import { PayrollLaborAllocationsTable } from "../labor-allocations-table/labor-allocations-table.payroll.component.jsx"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -49,7 +50,7 @@ export function TimeTicketModalComponent({ splitKey: bodyshop.imexshopid }); - const [loadLineTicketData, { loading, data: lineTicketData }] = useLazyQuery(GET_LINE_TICKET_BY_PK, { + const [loadLineTicketData, { loading, data: lineTicketData, refetch }] = useLazyQuery(GET_LINE_TICKET_BY_PK, { fetchPolicy: "network-only", nextFetchPolicy: "network-only" }); @@ -320,13 +321,34 @@ export function TimeTicketModalComponent({ - + ); } -export function LaborAllocationContainer({ jobid, loading, lineTicketData, hideTimeTickets = false }) { +export function LaborAllocationContainer({ + jobid, + loading, + lineTicketData, + hideTimeTickets = false, + bodyshop, + refetch +}) { const { t } = useTranslation(); + const { + treatments: { Enhanced_Payroll } + } = useTreatmentsWithConfig({ + attributes: {}, + names: ["Enhanced_Payroll"], + splitKey: bodyshop.imexshopid + }); + if (loading) return ; if (!lineTicketData) return null; if (!jobid) return null; @@ -337,12 +359,23 @@ export function LaborAllocationContainer({ jobid, loading, lineTicketData, hideT - + {Enhanced_Payroll.treatment === "off" ? ( + + ) : ( + + )} {!hideTimeTickets && (