mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-06 22:52:06 +00:00
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:
parent
50a7a030bf
commit
abcc6b44cd
5 changed files with 6 additions and 4 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { buildSiteDialogPatch } from "@/app/(protected)/workorders/_components/list/table/cells/build-site-dialog-patch";
|
import { buildSiteDialogPatch } from "@/app/(protected)/workorders/_components/list/table/cells/build-site-dialog-patch";
|
||||||
import {
|
import { resolveLocationId } from "@/app/(protected)/workorders/_components/list/table/cells/site-dialog-helpers";
|
||||||
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 type { SitePatch } from "@/app/(protected)/workorders/_components/list/table/cells/site-dialog-types";
|
||||||
import { useLocationDetail } from "@/domain/locations/use-cases/use-location-detail";
|
import { useLocationDetail } from "@/domain/locations/use-cases/use-location-detail";
|
||||||
import { formatLocationAddressPreview } from "@/domain/locations/mappers/location-mapper";
|
import { formatLocationAddressPreview } from "@/domain/locations/mappers/location-mapper";
|
||||||
|
|
@ -34,7 +32,7 @@ export function useSiteDialogState({
|
||||||
pocName,
|
pocName,
|
||||||
pocPhone,
|
pocPhone,
|
||||||
pocNotes,
|
pocNotes,
|
||||||
additionalContacts,
|
additionalContacts = [],
|
||||||
sites,
|
sites,
|
||||||
createMode,
|
createMode,
|
||||||
onSave,
|
onSave,
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ function renderSiteDialogState() {
|
||||||
pocName: "",
|
pocName: "",
|
||||||
pocPhone: "",
|
pocPhone: "",
|
||||||
pocNotes: "",
|
pocNotes: "",
|
||||||
|
additionalContacts: [],
|
||||||
sites: SITES,
|
sites: SITES,
|
||||||
createMode: true,
|
createMode: true,
|
||||||
onSave: vi.fn(),
|
onSave: vi.fn(),
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ function baseInfo(overrides: Partial<WorkOrderTableRow> = {}): WorkOrderTableRow
|
||||||
pocName: "",
|
pocName: "",
|
||||||
pocPhone: "",
|
pocPhone: "",
|
||||||
pocNotes: "",
|
pocNotes: "",
|
||||||
|
additionalContacts: [],
|
||||||
dueDate: "",
|
dueDate: "",
|
||||||
rescheduleCount: 0,
|
rescheduleCount: 0,
|
||||||
carriedOver: 0,
|
carriedOver: 0,
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ function baseRow(overrides: Partial<WorkOrderTableRow> = {}): WorkOrderTableRow
|
||||||
pocName: "",
|
pocName: "",
|
||||||
pocPhone: "",
|
pocPhone: "",
|
||||||
pocNotes: "",
|
pocNotes: "",
|
||||||
|
additionalContacts: [],
|
||||||
dueDate: "",
|
dueDate: "",
|
||||||
rescheduleCount: 0,
|
rescheduleCount: 0,
|
||||||
carriedOver: 0,
|
carriedOver: 0,
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ function row(overrides: Partial<WorkOrderTableRow> = {}): WorkOrderTableRow {
|
||||||
pocName: "",
|
pocName: "",
|
||||||
pocPhone: "",
|
pocPhone: "",
|
||||||
pocNotes: "",
|
pocNotes: "",
|
||||||
|
additionalContacts: [],
|
||||||
dueDate: "2026-07-20",
|
dueDate: "2026-07-20",
|
||||||
rescheduleCount: 0,
|
rescheduleCount: 0,
|
||||||
carriedOver: 0,
|
carriedOver: 0,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue