Commit 4e2f691
feat(dashboard): refactor GERENTE dashboard to match ALUNO quality bar (#199)
* docs(gerente): dashboard refactor design spec
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(dashboard): implementation plan for gerente dashboard refactor
* feat(dashboard): replace synthetic crescimentoAnual with real series + delta schema
* Revert "feat(dashboard): replace synthetic crescimentoAnual with real series + delta schema"
This reverts commit b8009da.
* feat(dashboard): replace synthetic crescimentoAnual with real series + delta schema
* feat(dashboard): real Prisma series + KPI deltas, re-throw on DB error
* fix(dashboard): cast stats in data.test to assert crescimentoAnual absence
* feat(dashboard): empty state for honest no-data rendering
* feat(dashboard): kpi card component with delta + a11y
* feat(dashboard): tokenized multi-series charts with a11y + empty-state
* fix(dashboard): single <main> landmark, move pb-20 to inner wrapper
* feat(dashboard): wire overview KPI grid + real charts
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(dashboard): tokenize sub-pages, add pb-20, Suspense on treinos
* fix(dashboard): add vi import to multi-chart test (TS2304)
* feat(dashboard): loading + error boundaries with retry
* test(dashboard): assert financeiro drops #18181B + text-zinc-400
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(dashboard): delete legacy dashboard-charts.tsx (replaced by multi)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(dashboard): update CURRENT-STATE for gerente dashboard refactor
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dashboard): honest deltas + faturamento label (final review fixes)
Implements final whole-branch review findings:
- IMPORTANT alunos delta: cumulative total vs single-month signups nonsensical;
make schema optional, omit delta (no historical snapshot). KpiCard renders no badge.
- IMPORTANT faturamento mislabel: all-time _sum labeled 'Faturamento Mensal';
drop all-time aggregate query, use last(receitaPorMes) month bucket, relabel
'Faturamento Recente'. Honest period value + MoM delta.
- MINOR inadimplentes self-compare (always +0%): schema optional, omit delta.
- MINOR orphan V_FaturamentoMensalSchema: delete schema + 6 tests + stale aggregate
mock setups (query removed).
- MINOR findMany-vs-groupBy: ponytail comment with upgrade path.
Gates: Vitest 1166/0, tsc clean, lint 0/0.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dashboard): rename Matrículas Ativas → Novas Matrículas to match deltas.novos semantics
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(dashboard): narrow DeltasSchema default to receita+novos only
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(dashboard): add honest-mock variant — optional deltas → no badge on alunos/inadimplentes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(a11y): heading hierarchy + aria-hidden KpiCard triangle
EmptyState h3→h2, sr-only h2 before charts, aria-hidden on delta ▲/▼ glyph.
WCAG 2.2 SC 1.3.1 heading nesting fix.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(dashboard): isolate .strict() rejection — valid payload + unknown key
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* docs(dashboard): audit fix wave complete — CURRENT-STATE + plan
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(dashboard): omit KpiCard delta badge when delta===0 — neutral not positive
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(dashboard): generic error message + Sentry + Logger in error boundary
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(dashboard): brl currency formatting on Faturamento chart YAxis + Tooltip
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(dashboard): extract TreinosDataWrapper — Suspense now streams during fetch
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(dashboard): getMatriculasPorMes use Matricula.dataInicio not Aluno.dataCadastro
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(dashboard): pctDelta returns undefined when no prior period
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(dashboard): wrap treinos Suspense renders in act() for streaming boundary
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(dashboard): add onClick router navigation to Perfil + Configurações menu items
Both dropdown items had no handler — dead clicks. Added useRouter + icons.
Perfil → /dashboard/perfil, Configurações → /dashboard/configuracoes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(dashboard): add useRouter mock to layout test for UserMenu navigation
CI failure: 'No useRouter export defined on the next/navigation mock'.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Emiya Kiritsugu <emiyakiritsugu3@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3161975 commit 4e2f691
34 files changed
Lines changed: 2488 additions & 454 deletions
File tree
- docs
- superpowers
- plans
- specs
- src
- app/dashboard
- _components
- alunos
- financeiro
- planos
- treinos
- components
- dashboard
- ui
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
2 | 37 | | |
3 | 38 | | |
4 | 39 | | |
| |||
0 commit comments