Temps réel

🌍 Observatoire Mondial Diaspo'Actif

Tableau de bord statistique — diversité, compétences et impact de la communauté

Chargement des statistiques…
`); w.document.close(); setTimeout(() => w.print(), 500); } /* ── Filtres ── */ document.getElementById('st-filters').addEventListener('click', e => { const btn = e.target.closest('[data-period]'); if (!btn) return; document.querySelectorAll('[data-period]').forEach(b => b.classList.remove('active')); btn.classList.add('active'); currentPeriod = btn.dataset.period; loadStats(); }); document.getElementById('filter-pays').addEventListener('change', e => { currentPays = e.target.value; loadStats(); }); /* ── Auto-refresh 5 min ── */ function startAutoRefresh() { clearInterval(refreshTimer); refreshTimer = setInterval(loadStats, 5 * 60 * 1000); } /* ── Init ── */ (async function init() { if (typeof fetchCurrentUser === 'function') { await fetchCurrentUser(); if (typeof applyAuthState === 'function') applyAuthState(); } await loadStats(); startAutoRefresh(); })();