feat(ui): cruscotto regionale /regione (#231, F4) - #247
Conversation
Landing per l'ente regionale che consuma /regione/overview|comuni|idee: - KPI (comuni valutati/totali, maturità mediana, comuni maturi); - barra distribuzione per stato (zero→maturo) + legenda; - 'dove intervenire' (comuni/dimensioni) con drill-down; - classifica comuni (stato + ODM) e priorità regionali di pubblicazione (idee). Drill-down comune → /copilota#<istat> (la pagina Copilota legge l'hash, precompila e avvia la diagnosi). Voce 'Regione' in APP_NAV. README: sezione cruscotto (R14). tsc + next build (29 pagine, incl. /regione) + lint OK. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19b514df9f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| export default function Page() { | ||
| return ( | ||
| <DashboardGate> |
There was a problem hiding this comment.
Restrict the regional dashboard by role
In auth-enabled deployments, wrapping this new regional dashboard only in DashboardGate makes it available to any signed-in account; I checked that DashboardGate only verifies SignedIn, while the RBAC model defines regione/comune roles for cruscotto views and the non-public /regione/* data includes detailed municipal rankings and intervention targets. Since this is the ente-regionale view rather than the planned public subset, a cittadino or comune user can open it directly (and it is also linked from the signed-in nav).
Useful? React with 👍 / 👎.
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| {comuni.slice(0, 30).map((c) => ( |
There was a problem hiding this comment.
Preserve access to all municipalities
For any region with more than 30 comuni, this truncates the backend's complete ranked list without pagination or search, so municipalities below the first page cannot be reached from the dashboard's drill-down links; because the API sorts by descending ODM, the hidden rows are often the weakest/unassessed municipalities that regional users need to inspect. Render the full list or add paging/filtering instead of dropping the remaining rows client-side.
Useful? React with 👍 / 👎.
F4: la UI del cruscotto per l'ente regionale, che consuma gli endpoint F2/F3.
/regione(dietro DashboardGate)/copilota#<istat>; la pagina Copilota ora legge l'hash, precompila il codice ISTAT e avvia la diagnosi (nessunuseSearchParams/Suspense — funziona in static export).APP_NAV.Docs (R14)
README: nuova sezione «Cruscotto regionale» (Cos'è / Come funziona / A cosa serve) → rimanda a
docs/cruscotto-regionale.md.Verifica
tscpulito ·next buildstatic export 29 pagine (incl./regione) ·next lintsenza errori.Parte di #227 · prossime F5 (#232 vista pubblica) e F6 (#233 trend).
🤖 Generated with Claude Code