feat: add admin notification for interrupted services with announcement display
This commit is contained in:
parent
218b581e74
commit
b9219fbbfe
1 changed files with 29 additions and 0 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue