printedparts stage 14: retire/restore in the UI, dashless item codes
Retire button with confirmation on the detail page (item leaves the storefront and the kiosk rejects its code; ledger history and label survive), Restore on retired items, and an Include-retired list toggle with a badge. Restore is its own permission-gated POST - the generic update still cannot flip isactive. New codes mint as WJRP0042 style without the dash; existing codes are immutable bin labels and keep their form.
This commit is contained in:
@@ -335,6 +335,18 @@ docs-drift guard again).
|
||||
4. Test: active user's email + free-text merge deduped, inactive user
|
||||
skipped (`test_alert_recipients_merge_users_and_freetext`).
|
||||
|
||||
## Stage 14 (extension) - retire/restore in the UI, dashless codes
|
||||
|
||||
Field feedback stage: the soft-delete endpoint existed with no button, and
|
||||
the site wanted `WJRP0042`, not `WJRP-0042`.
|
||||
1. Detail gains Retire (confirm dialog; item leaves the storefront and the
|
||||
kiosk 404s its code, history and label intact) and Restore; the list
|
||||
gains an Include-retired toggle (`?active=false`) with a Retired badge.
|
||||
Restore is its own POST gated by printedparts.delete - PUT deliberately
|
||||
cannot flip isactive.
|
||||
2. Minting drops the dash: `f'{prefix}{id:04d}'`. Existing items keep their
|
||||
codes - itemcode is an immutable label once printed on a bin.
|
||||
|
||||
---
|
||||
|
||||
## Where each pattern lives (cheat sheet)
|
||||
|
||||
Reference in New Issue
Block a user