Pagina partita: sezioni a scomparsa

Formazioni, badge, sondaggio, pagelle, scout e rosa diventano sezioni a
scomparsa; aperti all'inizio solo rosa e presenze e il sondaggio nella
sua finestra. Le formazioni indicano la fonte «Livescore CSI», lo scout
il numero di valutazioni. Titoli allineati a 20px e niente vuoto sotto
le sezioni chiuse.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-11-06 23:47:36 +01:00
1 parent e6cfb1bf00
commit c98e1ef218
3 files changed
+41 -15

No files matched your search

+3
View File
@@ -20,6 +20,9 @@ versioni `0.y.z` erano pre-release.
### Modificato ### Modificato
- Pagina partita: formazioni, badge, sondaggio, pagelle, scout e rosa sono sezioni a scomparsa
(aperti all'inizio solo rosa e presenze e, nella sua finestra, il sondaggio). Le formazioni
indicano la fonte «Livescore CSI»; lo scout mostra il numero di valutazioni.
- Sondaggio cacche: la classifica completa è visibile a tutti i giocatori, anche a sondaggio - Sondaggio cacche: la classifica completa è visibile a tutti i giocatori, anche a sondaggio
chiuso, con posizioni a pari merito senza salti (1°, 1°, 2°) e la propria riga evidenziata. chiuso, con posizioni a pari merito senza salti (1°, 1°, 2°) e la propria riga evidenziata.
- Pagelle di fine partita: non compaiono più i convocati che risultano assenti o infortunati. - Pagelle di fine partita: non compaiono più i convocati che risultano assenti o infortunati.
+5 -2
View File
@@ -310,11 +310,14 @@ export function SezioneTendina({
<button <button
type="button" type="button"
onClick={() => setAperta((v) => !v)} onClick={() => setAperta((v) => !v)}
className="mb-3 flex min-h-11 w-full items-center justify-between gap-3 text-left active:scale-[0.99]" className={cn(
"flex min-h-11 w-full items-center justify-between gap-3 text-left active:scale-[0.99]",
(aperta || anteprima) && "mb-3",
)}
aria-expanded={aperta} aria-expanded={aperta}
aria-controls={id} aria-controls={id}
> >
<h2 className="font-display-sm text-lg uppercase">{titolo}</h2> <h2 className="font-display-sm text-[20px] uppercase">{titolo}</h2>
<span className="flex shrink-0 items-center gap-2"> <span className="flex shrink-0 items-center gap-2">
{azione} {azione}
<ChevronDown <ChevronDown
+33 -13
View File
@@ -1,7 +1,7 @@
import { createFileRoute } from "@tanstack/react-router"; import { createFileRoute } from "@tanstack/react-router";
import { MapPin, Clock, Users, Trophy, Swords, Download } from "lucide-react"; import { MapPin, Clock, Users, Trophy, Swords, Download } from "lucide-react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { Card, PageHeader, Section } from "@/components/crapp/ui-bits"; import { Card, PageHeader, Section, SezioneTendina } from "@/components/crapp/ui-bits";
import { formatData } from "@/lib/crapp-data"; import { formatData } from "@/lib/crapp-data";
import { convocatiEvento, useEvento } from "@/lib/eventi"; import { convocatiEvento, useEvento } from "@/lib/eventi";
import { useRosa } from "@/lib/rosa"; import { useRosa } from "@/lib/rosa";
@@ -10,6 +10,7 @@ import { matchDaPartitaCsi, partiteGiocate } from "@/lib/csi-core";
import { DettaglioCsiEsteso, LogoSquadra, MetaPartitaCsi } from "@/components/crapp/DettaglioCsi"; import { DettaglioCsiEsteso, LogoSquadra, MetaPartitaCsi } from "@/components/crapp/DettaglioCsi";
import { Pagelle } from "@/components/crapp/Pagelle"; import { Pagelle } from "@/components/crapp/Pagelle";
import { SondaggioCacche } from "@/components/crapp/SondaggioCacche"; import { SondaggioCacche } from "@/components/crapp/SondaggioCacche";
import { sondaggioAperto } from "@/lib/cacche";
import { ScoutEntry } from "@/components/crapp/ScoutEntry"; import { ScoutEntry } from "@/components/crapp/ScoutEntry";
import { haPunteggio, useScoutMatches } from "@/lib/scout-store"; import { haPunteggio, useScoutMatches } from "@/lib/scout-store";
import { ScoutReport } from "@/components/crapp/ScoutReport"; import { ScoutReport } from "@/components/crapp/ScoutReport";
@@ -205,9 +206,16 @@ function PartitaDetail() {
) : null} ) : null}
{csiMatch ? ( {csiMatch ? (
<Section titolo="Formazioni e scontri diretti"> <SezioneTendina
titolo="Formazioni e scontri diretti"
azione={
<span className="text-[13px] font-bold uppercase text-muted-foreground">
Livescore CSI
</span>
}
>
<DettaglioCsiEsteso matchId={csiMatch.id} avversario={avversario} /> <DettaglioCsiEsteso matchId={csiMatch.id} avversario={avversario} />
</Section> </SezioneTendina>
) : null} ) : null}
<Section titolo="MVP eletto dalla squadra"> <Section titolo="MVP eletto dalla squadra">
@@ -219,9 +227,9 @@ function PartitaDetail() {
{match ? ( {match ? (
// Badge e cacche non si mostrano all'allenatore (DD-034). // Badge e cacche non si mostrano all'allenatore (DD-034).
sonoAllenatore ? null : ( sonoAllenatore ? null : (
<Section titolo="Badge votati dai compagni"> <SezioneTendina titolo="Badge votati dai compagni">
<VotoSocial matchId={match.id} /> <VotoSocial matchId={match.id} />
</Section> </SezioneTendina>
) )
) : ( ) : (
<Section titolo="In programma"> <Section titolo="In programma">
@@ -237,13 +245,16 @@ function PartitaDetail() {
</Section> </Section>
{sonoAllenatore ? null : ( {sonoAllenatore ? null : (
<Section titolo="Sondaggio pre-partita"> <SezioneTendina
titolo="Sondaggio pre-partita"
defaultAperta={sondaggioAperto(evento.data, evento.ora)}
>
<SondaggioCacche eventoId={evento.id} dataEvento={evento.data} oraEvento={evento.ora} /> <SondaggioCacche eventoId={evento.id} dataEvento={evento.data} oraEvento={evento.ora} />
</Section> </SezioneTendina>
)} )}
{match ? ( {match ? (
<Section titolo="Pagelle di fine partita"> <SezioneTendina titolo="Pagelle di fine partita">
<Pagelle <Pagelle
matchId={match.id} matchId={match.id}
convocati={convocati.filter( convocati={convocati.filter(
@@ -251,23 +262,32 @@ function PartitaDetail() {
)} )}
chiuse={evento.pagelleChiuse} chiuse={evento.pagelleChiuse}
/> />
</Section> </SezioneTendina>
) : null} ) : null}
{scout ? ( {scout ? (
<Section titolo="Scout"> <SezioneTendina
titolo="Scout"
azione={
scout.valutazioni.length > 0 ? (
<span className="text-[13px] font-bold tabular-nums text-muted-foreground">
{scout.valutazioni.length} valutazioni
</span>
) : null
}
>
<ScoutReport scout={scout} rosa={rosa} admin={admin} /> <ScoutReport scout={scout} rosa={rosa} admin={admin} />
</Section> </SezioneTendina>
) : null} ) : null}
<Section titolo="Rosa e presenze"> <SezioneTendina titolo="Rosa e presenze" defaultAperta>
<RosaPresenze <RosaPresenze
eventoId={evento.id} eventoId={evento.id}
data={evento.data} data={evento.data}
tipo={evento.tipo} tipo={evento.tipo}
convocati={evento.convocati} convocati={evento.convocati}
/> />
</Section> </SezioneTendina>
</> </>
); );
} }