From e1ea198319dbac225ea6c3516d695af76235f13c Mon Sep 17 00:00:00 2001 From: Arthur Bassi Date: Mon, 27 Jul 2026 10:59:28 -0300 Subject: [PATCH] fix(work-orders): make board-api head build in isolation Include wizard-service-notes-fields in this slice, keep ApiError export, and align JSX/boolean lint plus save-id wiring after rebase onto dev. --- .../list/table/cells/pm-type-cell.tsx | 4 +- .../list/table/cells/service-notes-dialog.tsx | 4 +- .../list/table/cells/site-dialog.tsx | 4 +- .../list/table/cells/vendor-dialog.tsx | 4 +- .../list/table/reschedule-toast.tsx | 5 +- .../_components/wizard/new-wo-wizard.tsx | 3 +- .../wizard/wizard-service-notes-fields.tsx | 140 ++++++++++++++++++ src/app/(protected)/workorders/index.tsx | 2 +- .../use-cases/use-save-work-order.ts | 12 +- ...ork-orders-board-core-affordances.test.tsx | 7 + 10 files changed, 166 insertions(+), 19 deletions(-) create mode 100644 src/app/(protected)/workorders/_components/wizard/wizard-service-notes-fields.tsx diff --git a/src/app/(protected)/workorders/_components/list/table/cells/pm-type-cell.tsx b/src/app/(protected)/workorders/_components/list/table/cells/pm-type-cell.tsx index 24a3a8fa..103f8ed6 100644 --- a/src/app/(protected)/workorders/_components/list/table/cells/pm-type-cell.tsx +++ b/src/app/(protected)/workorders/_components/list/table/cells/pm-type-cell.tsx @@ -172,7 +172,7 @@ export function PMTypeCell({
- {onSaveDetails ? ( + {Boolean(onSaveDetails) && ( - ) : null} + )} {filtered.map((pm) => (
- {selectedDistance ? ( + {Boolean(selectedDistance) && ( {selectedDistance} - ) : null} + )} {Boolean(selectedVendor?.contactName) && ( diff --git a/src/app/(protected)/workorders/_components/list/table/reschedule-toast.tsx b/src/app/(protected)/workorders/_components/list/table/reschedule-toast.tsx index 2e43deb5..73a4ab28 100644 --- a/src/app/(protected)/workorders/_components/list/table/reschedule-toast.tsx +++ b/src/app/(protected)/workorders/_components/list/table/reschedule-toast.tsx @@ -1,5 +1,6 @@ import { useEffect, useState } from "react"; import { Calendar as CalendarIcon, X } from "lucide-react"; +import { Text } from "@/components/ui/text"; const TOAST_DURATION_MS = 6000; @@ -37,9 +38,9 @@ export function RescheduleToast({
+ ); + })} + {filtered.length === 0 && ( +
+ No services match. +
+ )} +
+ +
+ Notes / Issue Detail +