fix(work-orders): finish SH-218 merge with dev and test fixtures

Merge dev createMode/inline identity with additionalContacts dialog flow;
restore validation errors and additionalContacts in inline create patches.
This commit is contained in:
Arthur Bassi 2026-08-13 16:11:35 -03:00
parent 50a7a030bf
commit abcc6b44cd
5 changed files with 6 additions and 4 deletions

View file

@ -1,8 +1,6 @@
import { useEffect, useState } from "react";
import { buildSiteDialogPatch } from "@/app/(protected)/workorders/_components/list/table/cells/build-site-dialog-patch";
import {
resolveLocationId,
} from "@/app/(protected)/workorders/_components/list/table/cells/site-dialog-helpers";
import { resolveLocationId } from "@/app/(protected)/workorders/_components/list/table/cells/site-dialog-helpers";
import type { SitePatch } from "@/app/(protected)/workorders/_components/list/table/cells/site-dialog-types";
import { useLocationDetail } from "@/domain/locations/use-cases/use-location-detail";
import { formatLocationAddressPreview } from "@/domain/locations/mappers/location-mapper";
@ -34,7 +32,7 @@ export function useSiteDialogState({
pocName,
pocPhone,
pocNotes,
additionalContacts,
additionalContacts = [],
sites,
createMode,
onSave,

View file

@ -42,6 +42,7 @@ function renderSiteDialogState() {
pocName: "",
pocPhone: "",
pocNotes: "",
additionalContacts: [],
sites: SITES,
createMode: true,
onSave: vi.fn(),

View file

@ -34,6 +34,7 @@ function baseInfo(overrides: Partial<WorkOrderTableRow> = {}): WorkOrderTableRow
pocName: "",
pocPhone: "",
pocNotes: "",
additionalContacts: [],
dueDate: "",
rescheduleCount: 0,
carriedOver: 0,

View file

@ -77,6 +77,7 @@ function baseRow(overrides: Partial<WorkOrderTableRow> = {}): WorkOrderTableRow
pocName: "",
pocPhone: "",
pocNotes: "",
additionalContacts: [],
dueDate: "",
rescheduleCount: 0,
carriedOver: 0,

View file

@ -58,6 +58,7 @@ function row(overrides: Partial<WorkOrderTableRow> = {}): WorkOrderTableRow {
pocName: "",
pocPhone: "",
pocNotes: "",
additionalContacts: [],
dueDate: "2026-07-20",
rescheduleCount: 0,
carriedOver: 0,