From afbaefee9dbfbd3afb07abed73193a4c95e3216a Mon Sep 17 00:00:00 2001 From: "arthur.bassi" Date: Mon, 10 Aug 2026 13:46:37 -0300 Subject: [PATCH] fix(work-orders): highlight Schedule On for unscheduled rows Restore forceScheduleHighlight for Unscheduled section rows while keeping Due Date highlight for past-due and attempt feedback. Co-authored-by: Cursor --- .../workorders/_components/list/table/wo-table-body.tsx | 2 +- .../workorders/_components/list/table/wo-table-row-cells.tsx | 3 +++ .../workorders/_components/list/table/wo-table-row.tsx | 3 +++ .../workorders/_components/list/table/wo-table.tsx | 5 +++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/(protected)/workorders/_components/list/table/wo-table-body.tsx b/src/app/(protected)/workorders/_components/list/table/wo-table-body.tsx index 4674e1e7..b859994f 100644 --- a/src/app/(protected)/workorders/_components/list/table/wo-table-body.tsx +++ b/src/app/(protected)/workorders/_components/list/table/wo-table-body.tsx @@ -6,7 +6,7 @@ import { WoTableSectionHeader } from "./wo-table-section-header"; type WoTableBodyProps = { tableData: ReturnTypeOfUseWorkOrdersTableData; - renderRow: (row: WorkOrderTableRow, forceDueDateHighlight?: boolean) => ReactNode; + renderRow: (row: WorkOrderTableRow, forceScheduleHighlight?: boolean) => ReactNode; renderInlineRow: (dayKey: string) => ReactNode; }; diff --git a/src/app/(protected)/workorders/_components/list/table/wo-table-row-cells.tsx b/src/app/(protected)/workorders/_components/list/table/wo-table-row-cells.tsx index 3014d0a4..40f97933 100644 --- a/src/app/(protected)/workorders/_components/list/table/wo-table-row-cells.tsx +++ b/src/app/(protected)/workorders/_components/list/table/wo-table-row-cells.tsx @@ -16,6 +16,7 @@ type WoTableRowCellsProps = { sites: LocationOption[]; sitePlace?: { city: string; state: string }; search?: string; + forceScheduleHighlight?: boolean; forceDueDateHighlight?: boolean; mutationCellStyle?: CSSProperties; handlers: WoTableRowHandlers; @@ -29,6 +30,7 @@ export function WoTableRowCells({ sites, sitePlace, search, + forceScheduleHighlight, forceDueDateHighlight, mutationCellStyle, handlers, @@ -105,6 +107,7 @@ export function WoTableRowCells({ handlers.onScheduleDate(row.id, date)} diff --git a/src/app/(protected)/workorders/_components/list/table/wo-table-row.tsx b/src/app/(protected)/workorders/_components/list/table/wo-table-row.tsx index 131e0df8..e6a22420 100644 --- a/src/app/(protected)/workorders/_components/list/table/wo-table-row.tsx +++ b/src/app/(protected)/workorders/_components/list/table/wo-table-row.tsx @@ -44,6 +44,7 @@ type WoTableRowProps = { vendors: VendorDropdownItem[]; pmTypes: string[]; search?: string; + forceScheduleHighlight?: boolean; forceDueDateHighlight?: boolean; isSelected: boolean; isFlashing: boolean; @@ -60,6 +61,7 @@ export function WoTableRow({ vendors, pmTypes, search, + forceScheduleHighlight, forceDueDateHighlight, isSelected, isFlashing, @@ -153,6 +155,7 @@ export function WoTableRow({ sites={sites} sitePlace={sitePlace} search={search} + forceScheduleHighlight={forceScheduleHighlight} forceDueDateHighlight={forceDueDateHighlight} mutationCellStyle={mutationCellStyle} handlers={handlers} diff --git a/src/app/(protected)/workorders/_components/list/table/wo-table.tsx b/src/app/(protected)/workorders/_components/list/table/wo-table.tsx index a6570466..94e019a7 100644 --- a/src/app/(protected)/workorders/_components/list/table/wo-table.tsx +++ b/src/app/(protected)/workorders/_components/list/table/wo-table.tsx @@ -72,7 +72,7 @@ export function WoTable({ onScheduleHighlight: setDueDateHighlightId, }); - const renderRow = (row: WorkOrderTableRow, forceDueDateHighlight = false) => ( + const renderRow = (row: WorkOrderTableRow, forceScheduleHighlight = false) => (