pelagia-portal/App/tests/unit
Claude (review-bot) d0e43135f8
All checks were successful
PR checks / checks (pull_request) Successful in 49s
PR checks / integration (pull_request) Successful in 31s
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-26 01:03:17 +05:30
..
application-pipeline.test.ts feat(crewing): Phase 3b — recruitment pipeline (flagged) 2026-06-22 18:49:12 +05:30
appraisal-state-machine.test.ts feat(crewing): Phase 5b — appraisal (flagged) 2026-06-22 22:09:32 +05:30
attachments.test.ts fix(po): show all attachments grouped by type on PO details 2026-06-19 04:43:44 +05:30
cancel-po-controls.test.tsx fix(po): make cancel buttons red & visible (use defined danger tokens) 2026-06-21 12:59:20 +05:30
crew-pii.test.ts fix(crewing): mask Aadhaar/PAN document numbers server-side 2026-06-22 23:29:11 +05:30
image-size.test.ts fix(po): size XLSX export images by pixels (aspect preserved) 2026-06-21 13:27:15 +05:30
pagination.test.ts feat(history): paginate PO history with items-per-page control 2026-06-24 03:26:47 +05:30
permissions-crewing.test.ts feat(crewing): admin crew management — direct placement, CRUD, strength config 2026-06-22 21:23:31 +05:30
permissions.test.ts feat(po): submitter view-all of POs + History + export (feature-flagged) 2026-06-22 04:57:11 +05:30
po-export-layout.test.ts fix(po): keep the export stamp clear of the signature (no overlap) 2026-06-21 15:35:09 +05:30
po-import-parser.test.ts test+ci: green the test baseline and make type-check + unit tests hard gates 2026-06-19 13:03:54 +05:30
po-line-items-editor.test.tsx feat(po): add week, month, year to line-item unit options 2026-06-21 00:32:39 +05:30
po-state-machine.test.ts chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
po-status-badge.test.tsx chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
reports.test.ts feat(reports): drill from cost centre / accounting code into PO History (#126) 2026-06-26 01:03:17 +05:30
requisition-state-machine.test.ts feat(crewing): Phase 2 — requisitions + relief requests (flagged) 2026-06-22 18:22:59 +05:30
sidebar.test.tsx feat(reports): Purchasing spend analytics (Cost Centres + Accounting Codes) 2026-06-24 07:52:23 +05:30
storage-keys.test.ts feat(po): per-company logo, stamp & brand bar on exported POs 2026-06-21 01:17:23 +05:30
unsaved-changes-guard.test.tsx feat(po): prompt to save as draft when leaving with unsaved changes 2026-06-24 06:37:33 +05:30
utils.test.ts feat(dashboard): compact INR formatting for Total Approved Spend card 2026-06-21 02:02:41 +05:30
validations.test.ts feat(po): allow submitter to set an optional PO date 2026-06-16 13:06:12 +05:30
vendor-form-captcha.test.tsx fix(vendors): move GSTIN CAPTCHA into a popup 2026-06-24 06:37:29 +05:30
vendor-select.test.tsx feat(po): make vendor field a searchable combobox 2026-06-24 05:16:57 +05:30
vendors-table.test.tsx refactor(routes): move /inventory/{items,vendors} → /catalogue/{items,vendors} 2026-06-24 05:04:29 +05:30