From 27ddeb29037ab2fb6d52589025f11c19586d5d0a Mon Sep 17 00:00:00 2001 From: Arthur Bassi Date: Thu, 3 Sep 2026 16:10:59 -0300 Subject: [PATCH] feat(work-orders): align inline type correction with the board AAP Keep type correction on the board: Type & severity, SEV toast, and audit copy. --- .../table/cells/severity-options-list.tsx | 4 + .../list/table/cells/type-cell.tsx | 4 +- .../list/table/cells/type-severity-modal.tsx | 21 +++- .../list/table/save-existing-row-type.ts | 20 ++++ .../list/table/wo-table-row-cells.tsx | 3 +- .../utils/board-audit-action-rules.ts | 35 ++++++ .../work-orders/utils/severity-escalation.ts | 20 ++++ .../workorders/save-existing-row-type.test.ts | 42 +++++++ .../(protected)/workorders/type-cell.test.tsx | 96 ++++++++++++++++ .../use-work-order-table-mutations.test.tsx | 108 ++++++++++++++++++ .../utils/format-board-audit-action.test.ts | 22 ++++ .../utils/severity-escalation.test.ts | 32 ++++++ .../utils/table-filter-utils.test.ts | 16 +++ .../work-orders/utils/work-order-lock.test.ts | 5 + 14 files changed, 425 insertions(+), 3 deletions(-) create mode 100644 src/app/(protected)/workorders/_components/list/table/save-existing-row-type.ts create mode 100644 src/domain/work-orders/utils/severity-escalation.ts create mode 100644 src/test/app/(protected)/workorders/save-existing-row-type.test.ts create mode 100644 src/test/app/(protected)/workorders/type-cell.test.tsx create mode 100644 src/test/domain/work-orders/utils/severity-escalation.test.ts diff --git a/src/app/(protected)/workorders/_components/list/table/cells/severity-options-list.tsx b/src/app/(protected)/workorders/_components/list/table/cells/severity-options-list.tsx index d78961af..656b5baf 100644 --- a/src/app/(protected)/workorders/_components/list/table/cells/severity-options-list.tsx +++ b/src/app/(protected)/workorders/_components/list/table/cells/severity-options-list.tsx @@ -71,6 +71,10 @@ export function SeverityField({ value, onSelect }: SeverityFieldProps) { sx={{ fontSize: 12, fontWeight: 600, marginBottom: "4px" }} > Severity (from APM) + + {" "} + * +