From e9755d364c10ec975c03884b9bc2532d4b4a0348 Mon Sep 17 00:00:00 2001 From: Ivan Cacciari Date: Sat, 5 Sep 2026 22:07:58 +0200 Subject: [PATCH] Aggiunge sottosezioni a swipe nel profilo, con stagione e serie unite. Co-authored-by: Cursor --- .../crapp/ProfiloAmministrativo.tsx | 148 ++++++----- src/routes/profilo.tsx | 229 +++++++++--------- 2 files changed, 202 insertions(+), 175 deletions(-) diff --git a/src/components/crapp/ProfiloAmministrativo.tsx b/src/components/crapp/ProfiloAmministrativo.tsx index 3ef62a7..ab17b0d 100644 --- a/src/components/crapp/ProfiloAmministrativo.tsx +++ b/src/components/crapp/ProfiloAmministrativo.tsx @@ -265,9 +265,12 @@ export function CampiProfilo({ export function ProfiloAmministrativo({ giocatoreId, indice = 0, + /** Se false, mostra solo il contenuto (es. dentro `BarraSottosezioni`). */ + conTendina = true, }: { giocatoreId: string; indice?: number; + conTendina?: boolean; }) { const { profili } = useProfili(); const salva = useSalvaProfilo(); @@ -301,79 +304,90 @@ export function ProfiloAmministrativo({ const caricato = (campo: keyof Profilo) => async (path: string) => scrivi({ ...corrente, [campo]: path }); + const corpo = ( +
+
+
+
+
+ + {perc}% + +
+ +

+ Servono agli amministratori per il tesseramento CSI. Li vedi solo tu e loro. +

+ + + + +
+ } + fileCertificato={ + + } + fileFoto={ + <> + + + + } + /> + + +
+ ); + + if (!conTendina) return corpo; + return ( {perc}%} > -
-
-
-
- -

- Servono agli amministratori per il tesseramento CSI. Li vedi solo tu e loro. -

- - - - -
- } - fileCertificato={ - - } - fileFoto={ - <> - - - - } - /> - - -
+ {corpo}
); } diff --git a/src/routes/profilo.tsx b/src/routes/profilo.tsx index f474c63..40cedb2 100644 --- a/src/routes/profilo.tsx +++ b/src/routes/profilo.tsx @@ -3,14 +3,8 @@ import { useEffect, useRef, useState } from "react"; import { toast } from "sonner"; import { Flame, Camera, Trash2, Bell, LogOut, ShieldCheck, Bug, Lightbulb } from "lucide-react"; import { cn } from "@/lib/utils"; -import { - Card, - PageHeader, - Section, - SezioneTendina, - StatTile, - TeamLogo, -} from "@/components/crapp/ui-bits"; +import { Card, PageHeader, StatTile, TeamLogo } from "@/components/crapp/ui-bits"; +import { BarraSottosezioni } from "@/components/crapp/BarraSottosezioni"; import { Avatar } from "@/components/crapp/Avatar"; import { caricaAvatar, @@ -126,7 +120,7 @@ function Profilo() { } + azione={} /> @@ -183,105 +177,124 @@ function Profilo() { -
-
- - - - - {g.streak} - - } - label="Presenze di fila" - /> - - - -
-
- -
- -
- - - - - - - -
-
- - {admin ? ( - - Dashboard amministratore - - - ) : null} - - Segnala un bug - - - - Suggerisci una nuova funzionalità - - - -
-
+ +
+ + + + + {g.streak} + + } + label="Presenze di fila" + /> + + + +
+ + + ), + }, + { + id: "badge", + label: "Badge", + contenuto: , + }, + { + id: "tesseramento", + label: "Tesseramento", + contenuto: , + }, + { + id: "impostazioni", + label: "Impostazioni", + contenuto: ( +
+ + {admin ? ( + + Dashboard amministratore + + + ) : null} + + Segnala un bug + + + + Suggerisci una nuova funzionalità + + + +
+ ), + }, + ]} + /> ); }