From 208dd5f2f6dc55abd8d256db22ec088cbb5edcd2 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Sun, 6 Sep 2026 10:27:12 +0200 Subject: [PATCH] =?UTF-8?q?Blocca=20la=20modifica=20delle=20presenze=20e?= =?UTF-8?q?=20il=20sollecito=20per=20eventi=20gi=C3=A0=20passati.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- src/components/crapp/EventoCard.tsx | 6 ++++-- src/components/crapp/RosaPresenze.tsx | 10 ++++++---- src/routes/allenamento.$id.tsx | 2 +- src/routes/partita.$id.tsx | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/crapp/EventoCard.tsx b/src/components/crapp/EventoCard.tsx index f485a57..a4475f6 100644 --- a/src/components/crapp/EventoCard.tsx +++ b/src/components/crapp/EventoCard.tsx @@ -8,6 +8,7 @@ import { Barra } from "@/components/motion/Barra"; import { useGiocatoriSquadra } from "@/lib/giocatori-squadra"; import { usePresenzeEvento, useSalvaPresenza } from "@/lib/presenze"; import { useGiocatoreCorrente } from "@/lib/user-store"; +import { dataOggi } from "@/lib/scout-live"; const tipoMeta = { partita: { label: "Partita", className: "bg-accent text-accent-foreground" }, @@ -51,6 +52,7 @@ export function EventoCard({ const totale = rosa.length; const perc = totale ? Math.round((presentiVeri / totale) * 100) : 0; const isCompleanno = evento.tipo === "compleanno"; + const passato = evento.data < dataOggi(); if (isCompleanno) { return ( @@ -130,7 +132,7 @@ export function EventoCard({