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

@ -1,6 +1,7 @@
import { usePlanning, RecurrenceType } from '@/context/PlanningContext';
import { format } from 'date-fns';
import React from 'react';
import { useNotification } from '@/context/NotificationContext';
export default function EventModal({
isOpen,
@ -10,6 +11,7 @@ export default function EventModal({
}) {
const { addEvent, handleUpdateEvent, handleDeleteEvent, schedules } =
usePlanning();
const { showNotification } = useNotification();
// S'assurer que planning est défini lors du premier rendu
React.useEffect(() => {
@ -46,7 +48,11 @@ export default function EventModal({
e.preventDefault();
if (!eventData.planning) {
alert('Veuillez sélectionner un planning');
showNotification(
'Veuillez sélectionner un planning',
'warning',
'Attention'
);
return;
}