feat(reports): wire Projects + Clients report detail views (PMS-179) #98
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mapps-reports-project-client"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Wire the Projects and Clients report detail views to the new backend report types (PMS-179). Previously these six report types all rendered an honest "not available yet" notice because no backend report powered them.
Why
The reports landing page advertised Projects (project-status, budget-tracking, milestone-tracking) and Clients (client-summary, asset-inventory, contract-renewals), but the detail page had nothing to show. The server now ships
GET /api/v1/reports/projectsandGET /api/v1/reports/clients, so the SPA can render live figures.Changes
ProjectsReportandClientsReportdeserialization structs (Decimal money/hours arrive as strings, parsed for display via a smallpf()helper).ReportKind::ProjectsandReportKind::Clients; map the six report types to them inreport_kind.build_viewarms that fetch the live aggregates and project them into the shared Summary + breakdownReportView. Project view: budget vs actual hours / amount, task completion, overdue count, broken down by status. Client view: company counts, asset totals, warranties expiring within 90 days, contract renewals, broken down by asset type.Out of scope
The custom report-builder stays a placeholder. PMS-93 explicitly rejected an ad-hoc query builder for v1 (injection / performance risk).
Verification
cargo check --target wasm32-unknown-unknownclean,cargo fmt --checkclean. (The one host clippy hit isclippy::manual_checked_opson pre-existingprojects.rs:686, a lint that only exists in host rust 1.95; CI runs rust 1.94 where it does not fire.)Depends on
mokosh-server PMS-179 (
GET /reports/projects+GET /reports/clients). Until that ships, the views fetch best-effort and render empty figures rather than erroring.🤖 Generated with Claude Code