feat: add admin notification for interrupted services with announcement display

This commit is contained in:
Marco Pedone 2026-03-30 10:04:43 +02:00
parent 218b581e74
commit b9219fbbfe

View file

@ -349,6 +349,35 @@ const Main = () => {
// se interrotto, mostra avvisos
if (servizio.isInterrotto) {
if (isAdmin) {
return (
<>
<div className="flex w-full items-center justify-center rounded-md bg-red-100 p-2 text-red-900">
<div className="flex items-center gap-2">
<SearchX className="size-5 text-red-500" />
<span>{t.servizio.servizio_interrotto}</span>
</div>
</div>
<div className="@container grid grid-flow-row @sm:grid-cols-2 grid-cols-1 gap-4">
{servizio.annunci.map((data) => {
return (
<ServizioAnnuncioProvider
data={data}
key={data.id}
servizioId={servizio.servizio_id}
>
<AnnuncioCard />
</ServizioAnnuncioProvider>
);
})}
{servizio.annunci.length > 1 &&
servizio.annunci.length % 2 === 1 && (
<div className="@sm:block hidden size-full rounded-md border border-(--pattern-fg) bg-[repeating-linear-gradient(45deg,var(--pattern-fg)_0,var(--pattern-fg)_1px,transparent_0,transparent_50%)] bg-size-[10px_10px] bg-fixed opacity-10 [--pattern-fg:#696969] dark:[--pattern-fg:#e1e1e1]" />
)}
</div>
</>
);
}
return (
<div className="flex w-full flex-col items-center justify-center gap-4 py-10 text-center">
<div className="flex size-14 items-center justify-center rounded-full bg-red-100 dark:bg-red-500/10">