mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-02 23:53:21 +00:00
2.6 KiB
2.6 KiB
Jira
QA residual
- Conscious adaptation: dialog vs design slide-over tab (no slide-over on this
dev). - P0 done: admin revoke of
approvedwith required reason. - P1:
+ Add/ Manage + attachments polish.
Summary
Adds the UPLIFT column to the work orders board table (after COMP DOC) with a status pill that opens a uplifts dialog (not a slide-over tab — board currently navigates to /workorders/:id on row detail).
- Maps
upliftSummaryon each board row:{ hasUplift, pendingCount, primaryStatus?, amount? } - Dialog: list uplifts, create (amount/notes + attachments UI stub), cancel pending, revoke
auto_approved(optional reason) andapprovedfor admin (required reason, SH-196); read-only when status is Completed/Canceled - WO-scoped API client + query keys under
workorders/{id}/uplifts - DEV in-memory mock fallback when API calls fail
API / assumptions
| Item | Assumption |
|---|---|
| UI surface | Dialog from UPLIFT column click — design ref uses slide-over tab, but dev has no slide-over; detail opens via route navigation |
| Row field | upliftSummary on GET /board and /board/search rows (see docs/work-orders/pending-be-contract.md) |
| Endpoints | GET/POST workorders/{id}/uplifts, POST …/uplifts/{id}/cancel|revoke — distinct from NTE queue uplifts API |
| Attachments | Create form shows disabled attachments field until BE accepts files |
| DEV mock | When import.meta.env.DEV and API throws, work-order-uplifts-mock-store serves list/create/cancel/revoke |
Out of scope (later PRs)
- Closability / Comp Doc pending gate (PR4)
- Advanced filter uplift facets (PR5)
- Vendor Portal NTE queue
Test plan
- Board row shows UPLIFT pill after COMP DOC (pending count or primary status + amount)
- Click UPLIFT opens dialog; Completed/Canceled rows are read-only
- Create uplift (DEV mock) updates list; cancel pending / revoke auto_approved work
- Admin can revoke
approveduplifts with required reason; non-admin cannot npm run verifygreen
Design ref
seahaven-desing — WorkOrders.tsx UpliftCell (~L4669)