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 = {
tableData: ReturnTypeOfUseWorkOrdersTableData;
renderRow: (row: WorkOrderTableRow, forceDueDateHighlight?: boolean) => ReactNode;
renderRow: (row: WorkOrderTableRow, forceScheduleHighlight?: boolean) => ReactNode;
renderInlineRow: (dayKey: string) => ReactNode;
};

View file

@ -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({
<DateCell
value={row.scheduledOn}
q={search}
highlight={forceScheduleHighlight}
allowWeekMode
targetWeek={row.targetWeek}
onSave={(date) => handlers.onScheduleDate(row.id, date)}

View file

@ -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}

View file

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