Eventi visibili solo ai convocati; «Rosa e presenze» filtrata sui convocati
- «Rosa e presenze» (allenamento, partita, evento) elenca, conta e solleciti solo i convocati invece di tutta la rosa; il riquadro «La tua risposta» sparisce per i non convocati. - Calendario, Home e elenco eventi mostrano un evento con convocati solo a chi è convocato; admin e allenatori lo vedono sempre, `convocati` vuoto = tutti (eventoVisibile). - Filtro solo lato interfaccia: la RLS di eventi_app non cambia. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3bf07049e9
commit
5ca081a6af
11 files changed
+81
-11
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { useEventiVisibili } from "@/lib/eventi-visibili";
|
||||
import { useEffect, useState } from "react";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { CalendarPlus, ChevronLeft, ChevronRight, Loader2, Pencil, Trash2, X } from "lucide-react";
|
||||
@@ -22,7 +23,6 @@ import {
|
||||
daCategoria,
|
||||
eventoVuoto,
|
||||
useEliminaEvento,
|
||||
useEventi,
|
||||
useSalvaEvento,
|
||||
type CategoriaEvento,
|
||||
type Evento,
|
||||
@@ -65,7 +65,7 @@ function GestioneEventi() {
|
||||
const io = useGiocatoreBase();
|
||||
// Admin o allenatore (DD-034): la RLS di `eventi_app` (M21) dice lo stesso.
|
||||
const puoGestire = usePuoGestireEventi();
|
||||
const { eventi, isPending, isError, error, refetch } = useEventi();
|
||||
const { eventi, isPending, isError, error, refetch } = useEventiVisibili();
|
||||
const { righe: squadra } = useGiocatoriSquadra();
|
||||
const salva = useSalvaEvento();
|
||||
const elimina = useEliminaEvento();
|
||||
|
||||
Reference in new issue
Block a user