Aggiunge il tracciamento del tesseramento CSI in giocatori_squadra
Numero e data della tessera arrivano dal comitato dopo l'iscrizione, quindi li scrive solo un admin (come numero/ruolo): estende il trigger di M1/M5, aggiunge il pannello dedicato in /admin con badge e conteggio in dashboard. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,22 @@ if (!URL_BASE || !CHIAVE_SERVIZIO || !CHIAVE_PUBBLICA) {
|
||||
assert.equal(righe[0]?.auth_user_id ?? null, null, "lo slot g1 è rimasto libero");
|
||||
});
|
||||
|
||||
// --- M8: tracciamento tesseramento CSI --------------------------------------
|
||||
const m8 = await rest(
|
||||
"giocatori_squadra?select=numero_tessera,data_tessera&limit=1",
|
||||
CHIAVE_SERVIZIO,
|
||||
);
|
||||
if (!m8.ok) {
|
||||
salta(
|
||||
"colonne di tesseramento in giocatori_squadra",
|
||||
"M8 non applicata (npx supabase db push)",
|
||||
);
|
||||
} else {
|
||||
await prova("giocatori_squadra espone numero e data della tessera CSI", async () => {
|
||||
assert.equal(m8.status, 200);
|
||||
});
|
||||
}
|
||||
|
||||
// --- M2: tabella dei profili -----------------------------------------------
|
||||
const m2 = await rest("profili_giocatore?select=giocatore_id&limit=1", CHIAVE_SERVIZIO);
|
||||
if (!m2.ok) {
|
||||
|
||||
@@ -21,6 +21,8 @@ const riga = (parziale: Partial<GiocatoreSquadra> = {}): GiocatoreSquadra => ({
|
||||
authUserId: null,
|
||||
attivo: true,
|
||||
email: null,
|
||||
numeroTessera: null,
|
||||
dataTessera: null,
|
||||
...parziale,
|
||||
});
|
||||
|
||||
|
||||
@@ -112,6 +112,8 @@ const squadra: GiocatoreSquadra[] = [
|
||||
authUserId: null,
|
||||
attivo: true,
|
||||
email: null,
|
||||
numeroTessera: null,
|
||||
dataTessera: null,
|
||||
},
|
||||
{
|
||||
id: "g2",
|
||||
@@ -122,6 +124,8 @@ const squadra: GiocatoreSquadra[] = [
|
||||
authUserId: "u2",
|
||||
attivo: true,
|
||||
email: null,
|
||||
numeroTessera: null,
|
||||
dataTessera: null,
|
||||
},
|
||||
];
|
||||
const csv = csvTesseramento(squadra, { g1: completo });
|
||||
|
||||
Reference in New Issue
Block a user