mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 23:13:12 +00:00
Document the backend #66 producer, drop incomplete extras from persist, and show the same required-field errors on POC 2+.
1.4 KiB
1.4 KiB
Work-order additionalContacts contract (SH-218)
Authoritative frontend contract for additional POC 2+ contacts. Implemented on backend PR shoc-backend#66.
Shape
{ name: string; phone: string; notes?: string }
- Primary POC remains
pocName/pocPhone/pocNotes. additionalContactsholds ordered POC 2+ only.- Notes are optional. An empty list (or omitted field) is valid.
- Retained entries require both
nameandphone. Fully blank placeholder rows are dropped and must not fail create. Name-only or phone-only entries are rejected on POST create and PATCH.
Endpoints
| Operation | Where |
|---|---|
| POST create | additionalContacts array on the board create body |
| GET board / search | additionalContacts on each board row |
| GET detail | info.additionalContacts (same ordered list as board) |
| PATCH | field: "additionalContacts", value is a JSON array string |
Until #66 is merged to the deployed API, a missing field is still mapped as []
on the frontend so the UI does not throw. After merge, create → reload →
board/slide-over must round-trip the ordered list through GET detail info.