feat(po): admin-managed delivery locations + Place of Delivery dropdown (#19) #100
No reviewers
Labels
No labels
bug
claude-failed
claude-pr
claude-queue
claude-working
epic
feature
interactive
portal
triaged
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: shad0w/pelagia-portal#100
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/delivery-locations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #19.
Summary
The PO Place of Delivery is now a dropdown sourced from an admin-managed Delivery Locations list, instead of free text.
Admin
DeliveryLocationmodel — a Company FK + free-text address +isActive(schema + migration).manage_delivery_locations→ Manager + SuperUser + Admin (Manager-accessible, not admin-only, per the issue)./admin/delivery-locations: searchable table + Add/Edit dialogs + activate/deactivate + delete (mirrors/admin/sites). Sidebar link under Administration.PO forms
<DeliveryLocationField>— a native<select name="placeOfDelivery">populated from the active locations, each formatted"Company — address"(lib/delivery-location.ts).Design choice — snapshot, not FK
PurchaseOrder.placeOfDeliverystays a free-text snapshot. The dropdown only changes how the value is picked, so:Tests
delivery-locations.test.ts: create/update/toggle/delete + themanage_delivery_locationsguard (6 tests).tsc --noEmitclean.Deploy note
Adds migration
20260624130000_delivery_locations→ runprisma migrate deploy. Applied to the local dev DB already.🤖 Generated with Claude Code