shoc-frontend-new/tmp/pr-descriptions/pr6-multi-poc.md
Arthur Bassi cfb0e7ea45 fix(work-orders): persist additionalContacts on create and board PATCH [SH-218]
[recover] remove malicious eslint payload (was 3f372257)
2026-08-10 17:12:11 -03:00

1.8 KiB
Raw Blame History

Jira

QA residual

  • Pass-UI / Blocked-BE until additionalContacts lands. Documented in pending BE contract.

Summary

  • Add additionalContacts[] ({ name, phone, notes? }) across board types, table rows, wizard draft, create payload, and PATCH expansion.
  • Site dialog and wizard step 2 share editable primary POC fields plus + Add point of contact for POC 2+; wizard sidebar summarizes additional contacts.
  • Missing backend field tolerates as []; normalized contacts persist via field: "additionalContacts" JSON PATCH and POST create.

Scope

In: additionalContacts types/mappers (create, detail row, PATCH); Site dialog; wizard step 2; persist + display POC 2+.

Out: Add technician (PR7), severity (PR2/PR5), filters, uplift (PR3–PR5).

Backend contract

See docs/work-orders/pending-be-contract.md — confirm additionalContacts[] on GET board/detail, POST create, and PATCH before production. Until then FE sends typed payloads and reads missing field as [].

Test plan

  • Open Site dialog on a board row → edit primary POC, add a second contact, Save → network PATCH includes additionalContacts JSON.
  • New WO wizard step 2 → add additional POC → create payload includes additionalContacts.
  • Reload board row with BE returning additionalContacts → Site dialog shows stored POC 2+.
  • BE omitting additionalContacts → no UI errors; lists render empty.
  • npm run verify green.

Notes

  • Primary POC remains pocName / pocPhone / pocNotes; additionalContacts holds POC 2+ only.
  • Site save still PATCHes siteCode; POC scalar fields remain local-only cache until BE exposes scalar PATCH.