Aggancia Squadra, Presenze, Pagelle, Scout e calendario alla rosa reale
convocatiEvento() e compleanniEventi() prendono ora la rosa come parametro invece di leggere la lista statica; csvScoutMatch() idem. Le schermate di gestione eventi, dettaglio allenamento/partita, calendario e scout live, più i widget di presenze/pagelle/voto MVP/voto social/sondaggio cacche/turno palloni, passano tutte la rosa letta da useRosa() o useGiocatoriSquadra(): un giocatore aggiunto o disattivato dalla dashboard admin ora si riflette ovunque.
This commit is contained in:
1 parent
b6c0f40f66
commit
4c0ea66126
14 files changed
+88
-59
No files matched your search
@@ -6,6 +6,7 @@ import { cn } from "@/lib/utils";
|
||||
import { EventoCard, linkPerEvento } from "@/components/crapp/EventoCard";
|
||||
import { PageHeader, Section } from "@/components/crapp/ui-bits";
|
||||
import { compleanniEventi, useEventi, type Evento } from "@/lib/eventi";
|
||||
import { useRosa } from "@/lib/rosa";
|
||||
import { useGiocatoreCorrente } from "@/lib/user-store";
|
||||
import { useIsAdmin } from "@/lib/ruoli";
|
||||
import {
|
||||
@@ -100,11 +101,12 @@ function Calendario() {
|
||||
const io = useGiocatoreCorrente();
|
||||
const admin = useIsAdmin();
|
||||
const { eventi } = useEventi();
|
||||
const rosa = useRosa();
|
||||
const { anno, mese, precedente, successivo } = useMeseNav();
|
||||
const { giorni, offsetLunedi } = giorniDelMese(anno, mese);
|
||||
const mesePrefix = `${anno}-${pad2(mese + 1)}`;
|
||||
|
||||
const compleanni = compleanniEventi(anno);
|
||||
const compleanni = compleanniEventi(rosa, anno);
|
||||
const compleanniMese = compleanni.filter((c) => c.data.startsWith(mesePrefix));
|
||||
const eventiMese = eventi.filter((e) => e.data.startsWith(mesePrefix));
|
||||
|
||||
|
||||
Reference in new issue
Block a user