diff --git a/docs/plans/2026-04-23-executive-report-v2-plan.md b/docs/plans/2026-04-23-executive-report-v2-plan.md new file mode 100644 index 0000000..6b83246 --- /dev/null +++ b/docs/plans/2026-04-23-executive-report-v2-plan.md @@ -0,0 +1,1778 @@ +# Executive Payroll Report v2 — Implementation Plan + +> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. + +**Goal:** Rebuild `/report/` as an executive-grade dashboard — multi-select project/team filters (Choices.js), hero KPI band with live "Outstanding Now" + FoxFitt-wide cost velocity, restructured chapters I–IV, new team × project activity pivot. Mirrored in the PDF. No model changes, no migrations. + +**Architecture:** The single helper `_build_report_context(start, end, project_ids, team_ids)` remains the source of truth for both the HTML view and the PDF view. Three new sub-helpers feed it: `_current_outstanding_in_scope`, `_company_cost_velocity`, `_team_project_activity`. The dashboard's outstanding math (currently inline in `index()` at lines 165–203) is first extracted to a reusable `_compute_outstanding()` helper so both the home dashboard and the report call the same code — zero drift risk. Templates restructured into four named chapters; Choices.js enhances the modal's two `` elements to multi-select** + +Find (around lines 63-79): +```django + +``` + +Change to: +```django + +``` + +Do the same for the team select. Note: the empty `` row is removed; "all" is now the empty-selection state. + +**Step 7.2: Add Choices.js CDN + init block at the bottom of the modal partial** + +At the very end of `_report_config_modal.html` (just before the closing script block from Step 7.3 or inside the existing script block near the end): + +```django +{# === CHOICES.JS — multi-select enhancement (admin-only) === #} +{# Loaded CDN-only; falls back to native elements in the report config modal +with