feat(dashboard,reports): wire Dashboard + Reports summaries (MAPPS-130) #93

Merged
longjacksonle merged 1 commit from feat/mapps-130-wire-dashboard-reports into main 2026-06-07 07:09:40 +02:00

What

Wires the last two hardcoded data pages - the Dashboard and the Reports detail - to the reports service (PMS-93) and the list endpoints.

Closes MAPPS-130.

Dashboard (/dashboard)

  • Stat cards: Open Tickets and SLA at-risk / breached from GET /reports/dashboard; Active Projects from GET /projects; Hours This Week from GET /time-entries (sum since Monday).
  • Cards: Recent Tickets (live GET /tickets, clickable), Recent Time Entries (GET /time-entries), and an Open-by-Priority breakdown from the dashboard report.
  • Dropped the fake "Today's Schedule" card (no calendar wiring in scope) and the decorative row components. Every fetch is best-effort, so empty / permission-denied responses degrade to zeros instead of a broken page.

Reports detail (/reports/:report_type)

  • Replaced the hardcoded Summary (342 / 4.2h / 94% / 4.7/5) and the fake weekly table with live figures from whichever backend report the report_type maps to: ticket/SLA from /reports/tickets + /reports/dashboard, utilization from /reports/time, revenue from /reports/billing, plus a real breakdown table (opened-by-status, A/R aging).
  • The landing page lists more report types than the backend (PMS-93) implements, so unmapped ones show an honest "not available yet" state. Time-series charts stay an explicit "coming soon" (no charting lib yet). Billing is manager-only server-side, so a non-manager sees empty billing figures.

Verification

  • cargo fmt --check clean; cargo clippy --target wasm32-unknown-unknown --all-targets -- -D warnings clean.
  • Live: GET /reports/dashboard -> 200 (open_by_priority, sla counts), /reports/tickets -> 200, /reports/billing -> 403 for a non-manager (handled gracefully).

Stacked on #88 / #89 / #91 / #92

Built on the MAPPS-126..129 branch. Until those merge this PR's diff also shows their changes. Merge #88, #89, #91, #92 first, then this.

🤖 Generated with Claude Code

## What Wires the last two hardcoded data pages - the Dashboard and the Reports detail - to the reports service (PMS-93) and the list endpoints. Closes MAPPS-130. ## Dashboard (`/dashboard`) - **Stat cards:** Open Tickets and SLA at-risk / breached from `GET /reports/dashboard`; Active Projects from `GET /projects`; Hours This Week from `GET /time-entries` (sum since Monday). - **Cards:** Recent Tickets (live `GET /tickets`, clickable), Recent Time Entries (`GET /time-entries`), and an Open-by-Priority breakdown from the dashboard report. - Dropped the fake "Today's Schedule" card (no calendar wiring in scope) and the decorative row components. Every fetch is best-effort, so empty / permission-denied responses degrade to zeros instead of a broken page. ## Reports detail (`/reports/:report_type`) - Replaced the hardcoded Summary (342 / 4.2h / 94% / 4.7/5) and the fake weekly table with live figures from whichever backend report the `report_type` maps to: ticket/SLA from `/reports/tickets` + `/reports/dashboard`, utilization from `/reports/time`, revenue from `/reports/billing`, plus a real breakdown table (opened-by-status, A/R aging). - The landing page lists more report types than the backend (PMS-93) implements, so unmapped ones show an honest "not available yet" state. Time-series charts stay an explicit "coming soon" (no charting lib yet). Billing is manager-only server-side, so a non-manager sees empty billing figures. ## Verification - `cargo fmt --check` clean; `cargo clippy --target wasm32-unknown-unknown --all-targets -- -D warnings` clean. - Live: `GET /reports/dashboard` -> 200 (`open_by_priority`, sla counts), `/reports/tickets` -> 200, `/reports/billing` -> 403 for a non-manager (handled gracefully). ## Stacked on #88 / #89 / #91 / #92 Built on the MAPPS-126..129 branch. Until those merge this PR's diff also shows their changes. **Merge #88, #89, #91, #92 first, then this.** 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(dashboard,reports): wire Dashboard + Reports summaries to the backend (MAPPS-130)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 44s
Create release / Create release from merged PR (pull_request) Has been skipped
5e0e380c47
The last hardcoded data pages. Both now read from the reports service (PMS-93) and the list endpoints.

Dashboard (DashboardPage): the stat cards and content cards are computed from real data. Open Tickets and the SLA at-risk / breached figures come from GET /reports/dashboard, Active Projects from GET /projects (active count), Hours This Week from GET /time-entries (sum since Monday). Recent Tickets is the live GET /tickets list (5 most recent, clickable through to the ticket), Recent Time Entries is GET /time-entries, and an Open-by-Priority card renders the dashboard report's priority breakdown. The fake "Today's Schedule" card was dropped (no calendar wiring in scope), and the decorative RecentTicketRow / ScheduleItem / SlaWarningItem / TimeEntryRow components are gone. Every fetch is best-effort so an empty or permission-denied response degrades to zeros rather than a broken page.

Reports detail (ReportDetailPage): the hardcoded Summary (342 tickets / 4.2h / 94% / 4.7/5) and the fake weekly "Detailed Data" table are replaced with live figures from whichever backend report the report_type maps to - ticket/SLA reports from /reports/tickets + /reports/dashboard, utilization from /reports/time, revenue from /reports/billing - plus a real breakdown table (opened-by-status, A/R aging). The reports landing page lists more report types than the backend implements, so unmapped ones render an honest "not available yet" state. Time-series charts stay an explicit "coming soon" since there is no charting lib yet. Billing is manager-only server-side, so a lower-privilege session sees empty billing figures.

Verified against the dev stack: GET /reports/dashboard and /reports/tickets return 200 with real data; /reports/billing is 403 for a non-manager (handled gracefully).

Stacked on the MAPPS-126..129 PRs; merge those first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/mapps-130-wire-dashboard-reports 2026-06-07 07:09:40 +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!93
No description provided.