mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 16:19:01 +00:00
1.2 KiB
1.2 KiB
Jira
QA residual
- P0 done: technician is staged as a local draft until the vendor dialog is saved / wizard submitted — Cancel does not orphan a vendor row.
Summary
- Adds + Add technician to the WO board vendor dialog when a company context is known (from the row or the current selection).
- Stages a draft technician locally (
draft:id) without callingPOST vendorsuntil the dialog save commits the selection. - On save, create runs via the existing
POST vendorsREST endpoint (vendorsApi.create/useCreateVendor) using the company profile + newcontactName.
Backend
Uses the established vendor create API (API_PATHS.rest.vendors → POST /vendors). Each vendor record represents one technician; linking to an existing company is done by sending the same companyName (and optional companyId when available). No new endpoint.
Test plan
- Open vendor dialog → + Add technician → fill name → Cancel dialog → no vendor create API call.
- Add technician → Save dialog →
POST /vendorsonce; row shows new tech. npm run verify
Out of scope
- Multi-POC, multi-tech arrays on WO, vendors directory redesign.