From 0eb2d60569a602e76261be9b3957d0a482659dc3 Mon Sep 17 00:00:00 2001 From: Ivan Cacciari Date: Wed, 9 Sep 2026 08:36:53 +0200 Subject: [PATCH] Sposta la classifica interna in Statistiche e uniforma le tab Squadra. Co-authored-by: Cursor --- docs/CHANGELOG.md | 5 ++ src/routes/squadra.tsx | 181 ++++++++++++++++++++--------------------- 2 files changed, 92 insertions(+), 94 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 6b2fba3..2235ae3 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -68,6 +68,11 @@ Prima versione, pre-release. - Infrastruttura di sviluppo: migrazione da Lovable a sviluppo locale, repository GitHub indipendente, deploy automatico su Vercel. +### Modificato + +- In Squadra la classifica interna (filtro «Classifica per» + elenco) è sotto i 6 riquadri + di Statistiche; la tab «Classifica» è stata rimossa dalla barra delle sottosezioni. + ### Sicurezza - Migration `m4_solo_autenticati`: tolto al ruolo `anon` l'accesso alle tabelle dell'app diff --git a/src/routes/squadra.tsx b/src/routes/squadra.tsx index f6cb050..33d1e43 100644 --- a/src/routes/squadra.tsx +++ b/src/routes/squadra.tsx @@ -104,8 +104,7 @@ function Squadra() { : 0; // Ogni tab è memoizzata: aprire/chiudere una card giocatore (stato `aperto`) - // non deve ricalcolare badge, classifica e obiettivi delle altre sezioni, - // che restano fuori schermo finché l'utente non cambia tab. + // non deve ricalcolare badge e obiettivi delle altre sezioni. const contenutoRosa = useMemo( () => (
@@ -232,94 +231,93 @@ function Squadra() { const contenutoStats = useMemo( () => ( -
- - - - - - +
+
+ + + + + + +
+ +
+ + + + + + Classifica per + +
+ {criteri.map((c) => ( + + + + ))} +
+
+
+ +
+ {ordinati.map((g, i) => ( +
+
+
+ + {i + 1} + +
+

+ {g.nome} + {i === 0 ? ( + + ) : null} +

+

+ #{g.numero} · {g.ruolo} · {g.streak} presenze consecutive +

+
+
+ + {valore(g, criterio) || "—"} + +
+ +
+ ))} +
+
), - [mediaPresenze, matchGiocati, pagelle, team], - ); - - const contenutoClassifica = useMemo( - () => ( - <> - - - - - - Classifica per - -
- {criteri.map((c) => ( - - - - ))} -
-
-
- -
- {ordinati.map((g, i) => ( -
-
-
- - {i + 1} - -
-

- {g.nome} - {i === 0 ? : null} -

-

- #{g.numero} · {g.ruolo} · {g.streak} presenze consecutive -

-
-
- - {valore(g, criterio) || "—"} - -
- -
- ))} -
- - ), - [filtroAperto, criterio, ordinati, max], + [mediaPresenze, matchGiocati, pagelle, team, filtroAperto, criterio, ordinati, max], ); const contenutoObiettivi = useMemo( @@ -439,15 +437,10 @@ function Squadra() {