fix: Ne pas retourner d'erreur si pas de dossier d'inscription

This commit is contained in:
N3WT DE COMPET
2025-05-30 09:52:08 +02:00
parent 8b54cedcab
commit be27fe1232

View File

@ -59,8 +59,8 @@ export default function DashboardPage() {
fetchRegisterForms(selectedEstablishmentId) fetchRegisterForms(selectedEstablishmentId)
.then((data) => { .then((data) => {
logger.info('Pending registrations fetched:', data); logger.info('Pending registrations fetched:', data);
setCurrentYearRegistrationCount(data.count); setCurrentYearRegistrationCount(data.count || 0);
const forms = data.registerForms; const forms = data.registerForms || [];
// Filtrage des statuts // Filtrage des statuts
const distribution = [ const distribution = [
@ -120,7 +120,7 @@ export default function DashboardPage() {
setMonthlyRegistrations(monthlyData); setMonthlyRegistrations(monthlyData);
}) })
.catch((error) => { .catch((error) => {
logger.error('Error fetching pending registrations:', error); logger.error('Erreur lors du fetch des inscriptions :', error);
}); });
// Fetch des événements à venir // Fetch des événements à venir