diff --git a/Reports-Mockup.md b/Reports-Mockup.md index aa1de80..3d10b05 100644 --- a/Reports-Mockup.md +++ b/Reports-Mockup.md @@ -11,6 +11,21 @@ hierarchy. > wired to the database. The live, clickable version is the standalone file > `reports-mockup.html` (see [Interactive version](#interactive-version) below). +## ✅ Implementation status (shipped) + +The core of this mockup is now **implemented** under **Reports → Purchasing** in the live app, wired to real approved-PO spend (not the sample data below): + +- **Cost Centres** (`/reports/cost-centres`) and **Accounting Codes** (`/reports/accounting-codes`), each with an index, drill-down, and detail view. +- Filters: **Granularity** (Monthly / Yearly), **Financial Year**, **Show** (Top 5 / Top 10 / Bottom 5 / All) — all URL-driven, so views are shareable/bookmarkable. +- KPI tiles, multi-series comparison charts, single-series trend charts, Top-N breakdowns (re-pivotable by tier / cost-centre / sub-account), per-row trend sparklines, and **CSV export**. +- Gated by the `view_analytics` permission (Manager / SuperUser / Auditor / Admin). Cost centres are **vessels** (the PO cost centre); sites are not cost centres. + +**Deferred** to a later pass: the synthetic **Weekly** granularity, the **“Add to graph”** custom multi-select comparison, and **line-item-level** account allocation (v1 attributes a PO’s whole amount to its PO-level accounting code). + +Code: `App/lib/reports.ts` (aggregation core + unit tests), `App/app/(portal)/reports/**` (pages), `App/components/reports/**` (toolbar + charts), `App/app/api/reports/spend/` (CSV export). + +--- + ## Shared shell Every report screen uses the same frame: the PPMS sidebar, a breadcrumb header,