feat(reports): wire Projects + Clients report detail views (PMS-179) #98

Merged
longjacksonle merged 1 commit from feat/mapps-reports-project-client into main 2026-06-09 22:42:11 +02:00

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/projects and GET /api/v1/reports/clients, so the SPA can render live figures.

Changes

  • Add ProjectsReport and ClientsReport deserialization structs (Decimal money/hours arrive as strings, parsed for display via a small pf() helper).
  • Add ReportKind::Projects and ReportKind::Clients; map the six report types to them in report_kind.
  • Add build_view arms that fetch the live aggregates and project them into the shared Summary + breakdown ReportView. 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.
  • Reword the "not available yet" notice so it is accurate now that only the custom report builder remains unimplemented.

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-unknown clean, cargo fmt --check clean. (The one host clippy hit is clippy::manual_checked_ops on pre-existing projects.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

## 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/projects` and `GET /api/v1/reports/clients`, so the SPA can render live figures. ## Changes - Add `ProjectsReport` and `ClientsReport` deserialization structs (Decimal money/hours arrive as strings, parsed for display via a small `pf()` helper). - Add `ReportKind::Projects` and `ReportKind::Clients`; map the six report types to them in `report_kind`. - Add `build_view` arms that fetch the live aggregates and project them into the shared Summary + breakdown `ReportView`. 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. - Reword the "not available yet" notice so it is accurate now that only the custom report builder remains unimplemented. ## 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-unknown` clean, `cargo fmt --check` clean. (The one host clippy hit is `clippy::manual_checked_ops` on pre-existing `projects.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](https://claude.com/claude-code)
feat(reports): wire Projects + Clients report detail views (MAPPS, PMS-179)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 47s
Create release / Create release from merged PR (pull_request) Has been skipped
827a691e1a
The reports landing page advertised Projects (project-status, budget-tracking, milestone-tracking) and Clients (client-summary, asset-inventory, contract-renewals) report types, but the detail page rendered an honest "not available yet" notice for all of them because no backend report existed. The server side now ships GET /reports/projects and GET /reports/clients (PMS-179), so this wires them through.

Adds ProjectsReport and ClientsReport deserialization structs, two new ReportKind variants, maps the six report types to them in report_kind, and adds build_view arms that fetch the live aggregates and project them into the shared Summary + breakdown ReportView. Project view shows budget vs actual hours/amount, task completion, and overdue count, broken down by status; Client view shows company counts, asset totals, warranties expiring within 90 days, and contract renewals, broken down by asset type. Decimal-as-string money/hours fields are parsed via a small pf() helper for display.

The "not available yet" notice is reworded so it is accurate now that only the custom report builder remains unimplemented.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/mapps-reports-project-client 2026-06-09 22:42:11 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!98
No description provided.