pelagia-portal/App/components/po
Hardik 02c0806d35
All checks were successful
PR checks / checks (pull_request) Successful in 51s
PR checks / integration (pull_request) Successful in 32s
refactor(po): admin-managed Project Codes instead of a static list
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>
2026-06-26 02:52:03 +05:30
..
cancel-po-controls.tsx fix(po): make cancel buttons red & visible (use defined danger tokens) 2026-06-21 12:59:20 +05:30
delivery-location-field.tsx feat(po): admin-managed delivery locations + Place of Delivery dropdown (#19) 2026-06-24 02:08:59 +05:30
discard-draft-button.tsx chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
email-vendor-button.tsx feat(po): email PO to vendor — PDF link in an Outlook draft (#14) 2026-06-24 02:45:48 +05:30
file-uploader.tsx chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
po-detail.tsx feat(po): user-defined T&C categories + dynamic PO terms editor (#11) 2026-06-24 04:43:24 +05:30
po-line-items-editor.tsx feat(po): add week, month, year to line-item unit options 2026-06-21 00:32:39 +05:30
po-status-badge.tsx chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
po-terms-editor.tsx feat(po): user-defined T&C categories + dynamic PO terms editor (#11) 2026-06-24 04:43:24 +05:30
project-code-field.tsx refactor(po): admin-managed Project Codes instead of a static list 2026-06-26 02:52:03 +05:30
submit-draft-button.tsx chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
unsaved-changes-guard.tsx feat(po): prompt to save as draft when leaving with unsaved changes 2026-06-24 06:37:33 +05:30