mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 16:19:01 +00:00
docs(work-orders): align pr description with jira and qa residuals
This commit is contained in:
parent
bfee557070
commit
dbfb864206
1 changed files with 13 additions and 7 deletions
|
|
@ -1,19 +1,25 @@
|
|||
## Jira
|
||||
|
||||
- [SH-193](https://luby-us.atlassian.net/browse/SH-193)
|
||||
|
||||
## 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).
|
||||
- Creates the technician via the existing **`POST vendors`** REST endpoint (`vendorsApi.create` / `useCreateVendor`), reusing the selected company's profile fields and registering a new `contactName` under that company.
|
||||
- After a successful create, the new technician is merged into the dialog options and auto-selected for the single-tech WO assignment.
|
||||
- Stages a draft technician locally (`draft:` id) without calling `POST vendors` until the dialog save commits the selection.
|
||||
- On save, create runs via the existing **`POST vendors`** REST endpoint (`vendorsApi.create` / `useCreateVendor`) using the company profile + new `contactName`.
|
||||
|
||||
## 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 from facets elsewhere). **No new endpoint** — confirm with BE that duplicate `companyName` + distinct `contactName` rows are the intended model for multiple technicians per company.
|
||||
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 a WO with an assigned company on the board → vendor cell → **+ Add technician** is visible.
|
||||
- [ ] Create a technician with name (+ optional phone) → new tech appears selected in the dialog.
|
||||
- [ ] Save → WO row shows the new technician and vendor id.
|
||||
- [ ] Open dialog on a row with no company → add affordance hidden until a company/tech context exists.
|
||||
- [ ] Open vendor dialog → **+ Add technician** → fill name → Cancel dialog → no vendor create API call.
|
||||
- [ ] Add technician → Save dialog → `POST /vendors` once; row shows new tech.
|
||||
- [ ] `npm run verify`
|
||||
|
||||
## Out of scope
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue