From 310d9c7e4516724e17b1804b79145d534c393077 Mon Sep 17 00:00:00 2001 From: shad0w Date: Wed, 24 Jun 2026 02:20:51 +0000 Subject: [PATCH] =?UTF-8?q?docs(reports):=20mark=20mockup=20implemented=20?= =?UTF-8?q?(Reports=20=E2=86=92=20Purchasing)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Reports-Mockup.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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,