feat: Preparation des modèles Settings pour l'enregistrement SMTP [#17]

This commit is contained in:
Luc SORIGNET
2025-05-05 09:25:07 +02:00
parent 99a882a64a
commit eda6f587fb
33 changed files with 468 additions and 74 deletions

View File

@ -10,7 +10,7 @@ import logger from '@/utils/logger';
import { fetchRegisterForms } from '@/app/actions/subscriptionAction';
import { fetchUpcomingEvents } from '@/app/actions/planningAction';
import { useEstablishment } from '@/context/EstablishmentContext';
import { useNotification } from '@/context/NotificationContext';
// Composant EventCard pour afficher les événements
const EventCard = ({ title, date, description, type }) => (
<div className="bg-stone-50 p-4 rounded-lg shadow-sm border border-gray-100 mb-4">
@ -39,6 +39,7 @@ export default function DashboardPage() {
const [classes, setClasses] = useState([]);
const { selectedEstablishmentId } = useEstablishment();
const { showNotification } = useNotification();
useEffect(() => {
if (!selectedEstablishmentId) return;
@ -64,6 +65,11 @@ export default function DashboardPage() {
})
.catch((error) => {
logger.error('Error fetching classes:', error);
showNotification(
'Error fetching classes: ' + error.message,
'error',
'Erreur'
);
});
// Fetch des formulaires d'inscription