pelagia-portal/App/app/(portal)
Claude (review-bot) fd7b31e64d
All checks were successful
PR checks / checks (pull_request) Successful in 49s
PR checks / integration (pull_request) Successful in 32s
feat(reports): drill from cost centre / accounting code into PO History (#126)
Report detail pages now link to the underlying POs, addressing the PR #126
review comment: drilling into a cost centre or accounting code opens PO
History pre-filtered to that dimension and the period in view.

- Cost Centre / Accounting Code detail pages gain a "View POs" link.
- periodRange() maps the on-screen period onto History's approved-date
  window (weekly→month, monthly→FY, yearly→full span); spend is dated by
  approvedAt.
- PO History gains an accountId filter (any tree node, expanded to leaves
  via accountLeafIds()) matching PO-level OR line-item accounts — the same
  basis the reports use.
- History page + CSV/PDF export share one buildPoHistoryWhere() builder so
  they never diverge.
- Tests: unit (periodRange, accountLeafIds) + integration (History account
  filter across PO-level/line-item, with the approved window).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 16:09:54 +05:30
..
admin fix(vendors): move GSTIN CAPTCHA into a popup 2026-06-24 06:37:29 +05:30
approvals feat(po): Project Code dropdown on PO forms 2026-06-24 13:35:59 +05:30
catalogue refactor(routes): move /inventory/{items,vendors} → /catalogue/{items,vendors} 2026-06-24 05:04:29 +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(reports): drill from cost centre / accounting code into PO History (#126) 2026-06-24 16:09:54 +05:30
inventory/cart refactor(routes): move /inventory/{items,vendors} → /catalogue/{items,vendors} 2026-06-24 05:04:29 +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): register line items in the product catalogue on approval 2026-06-24 04:59:47 +05:30
po feat(po): Project Code dropdown on PO forms 2026-06-24 13:35:59 +05:30
profile feat(crewing): foundations — SITE_STAFF role, ranks reference data + admin (flagged) 2026-06-22 13:26:04 +05:30
reports feat(reports): drill from cost centre / accounting code into PO History (#126) 2026-06-24 16:09:54 +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