diff --git a/Changelog.md b/Changelog.md index 8e3f3df..bd7249c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,11 @@ checked out in `~/pms`. See [Deployment and Operations](Deployment-and-Operation ### Added +- **Reports — Purchasing spend analytics** (`view_analytics`) — `/reports/cost-centres` and `/reports/accounting-codes`, each index → drill-down → detail; KPI tiles, comparison/trend charts (one colour per item), Top-N tables, sparklines, CSV export; URL-driven filters (Weekly/Monthly/Yearly, FY, Top/Bottom-N, "Add to graph"). Spend = post-approval POs by `approvedAt`/`totalAmount`, allocated per line-item account. See [Reports](Reports). +- **Email PO to vendor** (issue #14) — Outlook draft with a 7-day PO-PDF link, rendered by the **PdfService** microservice and cached per PO. See [Deployment and Operations](Deployment-and-Operations#microservices). +- **Microservices** — `EpfoService` (UAN/EPFO lookup) and `PdfService` (PO→PDF) join `GstService`; all auto-deployed on each release tag via `ecosystem.config.js`. +- **Unsaved-changes prompt** (issue #18) — leaving the PO create/edit screen with unsaved edits offers Save as draft / Discard / Stay. +- **Crew login on hire** (crewing) — onboarding/placement/admin-create can set an explicit login email + initial password for management ranks. - **Companies (multi-company invoicing)** — `Company` model and `/admin/companies` CRUD. A PO is billed under a selected company (name, short `code`, GST number, address, phone/mobile, contact + invoice email, invoice @@ -57,6 +62,8 @@ checked out in `~/pms`. See [Deployment and Operations](Deployment-and-Operation ### Fixed +- **"Email to vendor" never rendered** — auth middleware bounced the PdfService `svc`-token export fetch to `/login`; `/api/po//export` is now allowed through when the `svc` token matches (#127). +- **Reports charts all one colour** — `SERIES_COLORS` imported from a `"use client"` module into server components resolved to a proxy (undefined); moved the palette to a dependency-free module (#120). - Production `P2022 … column does not exist` after deploy — caused by shipping code whose Prisma client expected a column before `migrate deploy` ran. Migrations must be applied before the new build serves traffic (now in the