fix: Ajout du mode Visu

This commit is contained in:
N3WT DE COMPET
2025-05-04 14:32:06 +02:00
parent 4ecf25a6ab
commit e1c607308c
29 changed files with 531 additions and 414 deletions

View File

@ -15,7 +15,7 @@ import { useEstablishment } from '@/context/EstablishmentContext';
import { FE_ADMIN_STRUCTURE_SCHOOLCLASS_MANAGEMENT_URL } from '@/utils/Url';
import { usePlanning } from '@/context/PlanningContext';
import { useClasses } from '@/context/ClassesContext';
import { useRouter } from 'next/navigation';
const ItemTypes = {
TEACHER: 'teacher',
@ -119,7 +119,6 @@ const ClassesSection = ({
handleCreate,
handleEdit,
handleDelete,
}) => {
const [formData, setFormData] = useState({});
const [editingClass, setEditingClass] = useState(null);
@ -134,8 +133,8 @@ const ClassesSection = ({
const [selectedClass, setSelectedClass] = useState(null);
const { selectedEstablishmentId } = useEstablishment();
const { addSchedule, reloadPlanning, reloadEvents } = usePlanning();
const{ getNiveauxLabels, allNiveaux } = useClasses();
const { getNiveauxLabels, allNiveaux } = useClasses();
const router = useRouter();
// Fonction pour générer les années scolaires
const getSchoolYearChoices = () => {
@ -222,10 +221,9 @@ const ClassesSection = ({
name: planningName,
color: '#FF5733', // Couleur par défaut
school_class: createdClass.id,
}
addSchedule(newPlanning)
};
addSchedule(newPlanning);
});
})
.catch((error) => {
logger.error('Error:', error.message);