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 <cursoragent@cursor.com>
This commit is contained in:
arthur.bassi 2026-08-10 13:46:37 -03:00
parent 6c90ade18c
commit afbaefee9d
4 changed files with 10 additions and 3 deletions

View file

@ -6,7 +6,7 @@ import { WoTableSectionHeader } from "./wo-table-section-header";
type WoTableBodyProps = { type WoTableBodyProps = {
tableData: ReturnTypeOfUseWorkOrdersTableData; tableData: ReturnTypeOfUseWorkOrdersTableData;
renderRow: (row: WorkOrderTableRow, forceDueDateHighlight?: boolean) => ReactNode; renderRow: (row: WorkOrderTableRow, forceScheduleHighlight?: boolean) => ReactNode;
renderInlineRow: (dayKey: string) => ReactNode; renderInlineRow: (dayKey: string) => ReactNode;
}; };

View file

@ -16,6 +16,7 @@ type WoTableRowCellsProps = {
sites: LocationOption[]; sites: LocationOption[];
sitePlace?: { city: string; state: string }; sitePlace?: { city: string; state: string };
search?: string; search?: string;
forceScheduleHighlight?: boolean;
forceDueDateHighlight?: boolean; forceDueDateHighlight?: boolean;
mutationCellStyle?: CSSProperties; mutationCellStyle?: CSSProperties;
handlers: WoTableRowHandlers; handlers: WoTableRowHandlers;
@ -29,6 +30,7 @@ export function WoTableRowCells({
sites, sites,
sitePlace, sitePlace,
search, search,
forceScheduleHighlight,
forceDueDateHighlight, forceDueDateHighlight,
mutationCellStyle, mutationCellStyle,
handlers, handlers,
@ -105,6 +107,7 @@ export function WoTableRowCells({
<DateCell <DateCell
value={row.scheduledOn} value={row.scheduledOn}
q={search} q={search}
highlight={forceScheduleHighlight}
allowWeekMode allowWeekMode
targetWeek={row.targetWeek} targetWeek={row.targetWeek}
onSave={(date) => handlers.onScheduleDate(row.id, date)} onSave={(date) => handlers.onScheduleDate(row.id, date)}

View file

@ -44,6 +44,7 @@ type WoTableRowProps = {
vendors: VendorDropdownItem[]; vendors: VendorDropdownItem[];
pmTypes: string[]; pmTypes: string[];
search?: string; search?: string;
forceScheduleHighlight?: boolean;
forceDueDateHighlight?: boolean; forceDueDateHighlight?: boolean;
isSelected: boolean; isSelected: boolean;
isFlashing: boolean; isFlashing: boolean;
@ -60,6 +61,7 @@ export function WoTableRow({
vendors, vendors,
pmTypes, pmTypes,
search, search,
forceScheduleHighlight,
forceDueDateHighlight, forceDueDateHighlight,
isSelected, isSelected,
isFlashing, isFlashing,
@ -153,6 +155,7 @@ export function WoTableRow({
sites={sites} sites={sites}
sitePlace={sitePlace} sitePlace={sitePlace}
search={search} search={search}
forceScheduleHighlight={forceScheduleHighlight}
forceDueDateHighlight={forceDueDateHighlight} forceDueDateHighlight={forceDueDateHighlight}
mutationCellStyle={mutationCellStyle} mutationCellStyle={mutationCellStyle}
handlers={handlers} handlers={handlers}

View file

@ -72,7 +72,7 @@ export function WoTable({
onScheduleHighlight: setDueDateHighlightId, onScheduleHighlight: setDueDateHighlightId,
}); });
const renderRow = (row: WorkOrderTableRow, forceDueDateHighlight = false) => ( const renderRow = (row: WorkOrderTableRow, forceScheduleHighlight = false) => (
<WoTableRow <WoTableRow
key={String(row.id)} key={String(row.id)}
row={row} row={row}
@ -83,7 +83,8 @@ export function WoTable({
vendors={vendors} vendors={vendors}
pmTypes={pmTypes} pmTypes={pmTypes}
search={tableData.search} search={tableData.search}
forceDueDateHighlight={forceDueDateHighlight || dueDateHighlightId === row.id} forceScheduleHighlight={forceScheduleHighlight}
forceDueDateHighlight={dueDateHighlightId === row.id}
isSelected={tableData.selectedId === row.id} isSelected={tableData.selectedId === row.id}
isFlashing={tableData.flashId === row.id} isFlashing={tableData.flashId === row.id}
dragViz={tableData.dragViz} dragViz={tableData.dragViz}