mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
feat: Ajout des évenements à venir
This commit is contained in:
@ -47,7 +47,7 @@ export default function Layout({
|
||||
"subscriptions": { "id": "subscriptions", "name": t('subscriptions'), "url": FE_ADMIN_SUBSCRIPTIONS_URL, "icon": Users },
|
||||
"structure": { "id": "structure", "name": t('structure'), "url": FE_ADMIN_STRUCTURE_URL, "icon": Building },
|
||||
"grades": { "id": "grades", "name": t('grades'), "url": FE_ADMIN_GRADES_URL, "icon": FileText },
|
||||
"planning": { "id": "planning", "name": t('planning'), "url": FE_ADMIN_PLANNING_URL, "icon": Calendar },
|
||||
"planning": { "id": "planning", "name": t('events'), "url": FE_ADMIN_PLANNING_URL, "icon": Calendar },
|
||||
"settings": { "id": "settings", "name": t('settings'), "url": FE_ADMIN_SETTINGS_URL, "icon": Settings }
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
'use client'
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
@ -9,6 +8,7 @@ import { fetchClasses } from '@/app/actions/schoolAction';
|
||||
import StatCard from '@/components/StatCard';
|
||||
import logger from '@/utils/logger';
|
||||
import { fetchRegisterForms } from '@/app/actions/subscriptionAction';
|
||||
import { fetchUpcomingEvents } from '@/app/actions/planningAction';
|
||||
|
||||
|
||||
// Composant EventCard pour afficher les événements
|
||||
@ -64,22 +64,14 @@ export default function DashboardPage() {
|
||||
logger.error('Error fetching pending registrations:', error);
|
||||
});
|
||||
|
||||
fetchUpcomingEvents().then(data => {
|
||||
setUpcomingEvents(data);
|
||||
}).catch(error => {
|
||||
logger.error('Error fetching upcoming events:', error);
|
||||
});
|
||||
|
||||
// Simulation de chargement des données
|
||||
setTimeout(() => {
|
||||
setUpcomingEvents([
|
||||
{
|
||||
title: "Réunion de rentrée",
|
||||
date: "2024-09-01",
|
||||
description: "Présentation de l'année scolaire",
|
||||
type: "meeting"
|
||||
},
|
||||
{
|
||||
title: "Date limite inscriptions",
|
||||
date: "2024-08-15",
|
||||
description: "Clôture des inscriptions",
|
||||
type: "deadline"
|
||||
}
|
||||
]);
|
||||
setMonthlyStats({
|
||||
inscriptions: [150, 180, 210, 245],
|
||||
completionRate: 78
|
||||
|
||||
Reference in New Issue
Block a user