Fiche de Présence — Alhousseynou Ba

Thiès 2027 — Coalition Sénégal Uni
LIVE
Actualisation dans 30s

Infos de l'événement

Date
Lieu
Occasion
Enregistrer un participant
✅ Présence enregistrée !
❌ Erreur. Réessayez.
0
Total présents
0
Bénévoles
0
Communes
Dernière entrée
Liste des présents en temps réel
Dernière actualisation : maintenant
👥
Aucun participant enregistré.
Utilisez le formulaire pour commencer.
");w.document.close();w.print();} function sendWAReport(){if(!presences.length){alert("Aucune donnée.");return;}const b=presences.filter(p=>p.benevole==="Oui").length;let msg="📋 *Rapport de présence — Thiès 2027*\n\n📅 "+document.getElementById("evt-date").value+"\n📍 "+document.getElementById("evt-lieu").value+"\n\n👥 Total: *"+presences.length+"*\n🤝 Bénévoles: *"+b+"*\n\n*Liste:*\n";presences.slice(0,20).forEach((p,i)=>msg+=(i+1)+". "+p.prenom+" "+p.nom+" ("+p.quartier+")\n");if(presences.length>20)msg+="...et "+(presences.length-20)+" autres\n";window.open("https://wa.me/221771980297?text="+encodeURIComponent(msg),"_blank");} async function loadPresences(){document.getElementById("refresh-info").textContent="Actualisation en cours...";try{const r=await fetch(SB_URL+"/rest/v1/presences?select=*&order=created_at.desc&limit=100",{headers:{"apikey":SB_KEY,"Authorization":"Bearer "+SB_KEY}});if(r.ok){const data=await r.json();const today=new Date().toDateString();const td=data.filter(d=>new Date(d.created_at).toDateString()===today);if(td.length>0){presences=td.map(d=>({id:d.id,prenom:d.first_name||"",nom:d.last_name||"",tel:d.phone||"",commune:d.commune||"",quartier:d.quartier||"",benevole:d.benevole||"Non",heure:new Date(d.created_at).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"}),isNew:false}));updateStats();renderList();}}}catch(e){}document.getElementById("refresh-info").textContent="Dernière actualisation : "+new Date().toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"});} let ci=setInterval(()=>{countdown--;document.getElementById("refresh-timer").textContent="Actualisation dans "+countdown+"s";if(countdown<=0){loadPresences();countdown=30;}},1000); loadPresences();