pelagia-portal/App/app/(portal)
Claude (auto-fix) fdc3ebdac9 fix(dashboard): count all POs approved this month, not just current MGR_APPROVED
The manager dashboard "Approved This Month" card only counted POs whose
current status is MGR_APPROVED, so approvals that had already moved on to
payment, delivery, or closure dropped out of the count. Managers could not
see what happened to the POs they approved this month.

- Count every PO whose `approvedAt` falls in the current month across all
  post-approval statuses (MGR_APPROVED → ... → CLOSED). `approvedAt` is set
  once at approval and persists, so it is the correct anchor.
- Introduce a shared `POST_APPROVAL_STATUSES` constant (includes the
  previously-omitted PARTIALLY_CLOSED). This also fixes Total Approved Spend
  and the vessel/monthly breakdowns, which were silently dropping
  partially-received POs.
- Make the card a link into /history with an approval-date filter applied
  (?approvedFrom=<startOfMonth>) so a click shows the full set with each PO's
  current status, as requested.
- Add `approvedFrom`/`approvedTo` filtering to the history page, its filter
  UI, and the reports export route so the deep-link and exports stay in sync.

Scope note: the count remains org-wide, consistent with every other card on
the manager dashboard.

Adds an integration test covering the moved-on case and the date window.

Fixes #32
2026-06-19 12:07:53 +05:30
..
admin fix(profile+vendors): profile reachable for all roles incl SSO; submitter vendor creation 2026-06-08 18:53:33 +05:30
approvals fix(inventory): add items to inventory on PO approval, not on closure 2026-06-19 03:15:56 +05:30
dashboard fix(dashboard): count all POs approved this month, not just current MGR_APPROVED 2026-06-19 12:07:53 +05:30
history fix(dashboard): count all POs approved this month, not just current MGR_APPROVED 2026-06-19 12:07:53 +05:30
inventory fix(profile+vendors): profile reachable for all roles incl SSO; submitter vendor creation 2026-06-08 18:53:33 +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(payments): compulsory payment date when Accounts records payment 2026-06-10 08:59:25 +05:30
po fix(receipt): upsert Receipt record on repeat confirmations with notes 2026-06-19 04:01:26 +05:30
profile fix(profile+vendors): profile reachable for all roles incl SSO; submitter vendor creation 2026-06-08 18:53:33 +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