Replaces the hardcoded PROJECT_CODES array with an admin-managed
`ProjectCode` model, mirroring the Delivery Locations pattern (PR #100):
- ProjectCode model (unique `code` + isActive) + migration seeding the
five previously-hardcoded codes; PO.projectCode stays a free-text
snapshot (no FK) so history/exports/imports are unchanged.
- manage_project_codes permission (Manager + SuperUser + Admin).
- /admin/project-codes CRUD screen (table + Add/Edit + activate/delete)
and an Administration sidebar link.
- ProjectCodeField now takes `options` from the active codes; the three
PO forms + pages fetch them from the DB. Static list removed.
- Unit test reworked to the options API; CRUD integration test added;
documented in App/CLAUDE.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the free-text Project Code input with a native <select> carrying a
fixed list of project codes (Petronet LNG Cochin, COMACOE Trombay, Haldia
Reach, Haldia MMT, COMACOE Mandvi) plus an empty "— none —" option, across
all three PO forms (new / edit / manager-edit).
- Add a shared PROJECT_CODES constant in lib/validations/po.ts as the single
source of truth.
- Add a reusable <ProjectCodeField> (mirrors <DeliveryLocationField>): plain
HTML select keeping name="projectCode" so the server actions are unchanged.
- The field stays optional; projectCode remains a nullable free-text snapshot
(no schema/migration, no validation tightening) so legacy/imported values
are not rejected. On edit, a current value not in the list is preserved as a
leading "(current)" option so it is never silently dropped.
- Add unit tests for the new field.
Fixes#124
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>