mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 16:19:01 +00:00
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:
parent
6c90ade18c
commit
afbaefee9d
4 changed files with 10 additions and 3 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue