pelagia-portal/App/app/(portal)
Hardik a99b2ed5df
All checks were successful
PR checks / checks (pull_request) Successful in 43s
PR checks / integration (pull_request) Successful in 31s
feat(po): admin-managed Terms & Conditions catalogue + PO dropdowns (#11)
Mirrors the Place-of-Delivery (#19) pattern: an admin clause library that feeds
the PO T&C fields as dropdowns. (No "work order" type — POs only, per steer.)

- schema + migration: TermsCondition (category enum + text + isActive); the
  migration seeds the prior TC_DEFAULTS as the starting clauses.
- permission manage_terms (Manager + SuperUser + Admin).
- admin screen /admin/terms: table + Add/Edit dialogs + activate/deactivate +
  delete (mirrors /admin/delivery-locations); sidebar link under Administration.
- PO forms (new / edit / manager-edit): the five named T&C slots (Delivery /
  Dispatch / Inspection / Transit Insurance / Payment Terms) become a shared
  <TermsField> select sourced from active clauses of that category; "Others"
  stays free text; the fixed boilerplate lines are untouched.
- tc* columns stay free-text SNAPSHOTS (export/import unchanged); a current value
  not among active clauses is preserved as a "(current)" option.
- tests: terms CRUD + permission guard + grouping helper (6).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 03:38:32 +05:30
..
admin feat(po): admin-managed Terms & Conditions catalogue + PO dropdowns (#11) 2026-06-24 03:38:32 +05:30
approvals feat(po): admin-managed Terms & Conditions catalogue + PO dropdowns (#11) 2026-06-24 03:38:32 +05:30
crewing fix(crewing): make rank-held universal, ex-hand an admin-only flag 2026-06-23 21:33:50 +05:30
dashboard feat(dashboard): compact INR formatting for Total Approved Spend card 2026-06-21 02:02:41 +05:30
history feat(po): submitter view-all of POs + History + export (feature-flagged) 2026-06-22 04:57:11 +05:30
inventory feat(vendors): search by vendor ID and show it next to the name 2026-06-21 12:43:21 +05:30
my-orders fix(my-orders): correct closed PO filters for manager and submitter 2026-06-19 03:34:21 +05:30
payments feat(po): manager sets advance payment on approval (issue #92) 2026-06-24 01:40:20 +05:30
po feat(po): admin-managed Terms & Conditions catalogue + PO dropdowns (#11) 2026-06-24 03:38:32 +05:30
profile feat(crewing): foundations — SITE_STAFF role, ranks reference data + admin (flagged) 2026-06-22 13:26:04 +05:30
layout.tsx chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30