Semplifica il calendario e mostra le note solo sulle card Evento.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Cacciari
2026-09-07 11:38:03 +02:00
co-authored by Cursor
parent 10915d04fc
commit a06c5ed281
3 changed files with 40 additions and 55 deletions
+7
View File
@@ -84,6 +84,9 @@ export function EventoCard({
const isCompleanno = evento.tipo === "compleanno";
const passato = evento.data < dataOggi();
const cliccabile = Boolean(linkTo);
/** Solo gli eventi extra-campo non hanno scheda dedicata: le note restano sulla card. */
const noteCard =
evento.tipo === "evento" ? evento.note.trim() : "";
const stati =
evento.tipo === "evento"
? // Se resta un vecchio "infortunato", mostra il bottone solo per poterlo togliere.
@@ -171,6 +174,10 @@ export function EventoCard({
</span>
</div>
{noteCard ? (
<p className="mt-2.5 line-clamp-2 text-xs text-muted-foreground">📝 {noteCard}</p>
) : null}
{metaStato ? (
<p
className="mt-3 flex items-center gap-1.5 border-t border-border pt-2.5 text-left text-xs font-semibold text-muted-foreground"
+7 -5
View File
@@ -96,17 +96,19 @@ export function Section({
children,
indice = 0,
}: {
titolo: string;
titolo?: string;
azione?: ReactNode;
children: ReactNode;
indice?: number;
}) {
return (
<Reveal as="section" indice={indice} className="px-5 py-4">
<div className="mb-3 flex items-center justify-between gap-3">
<h2 className="font-display-sm text-lg uppercase">{titolo}</h2>
{azione}
</div>
{titolo || azione ? (
<div className="mb-3 flex items-center justify-between gap-3">
{titolo ? <h2 className="font-display-sm text-lg uppercase">{titolo}</h2> : <span />}
{azione}
</div>
) : null}
{children}
</Reveal>
);