feat: Validation du dossier d'inscription en affectant l'élève à une

classe de son niveau / création d'une fenêtre de visualisation d'une
classe (en cours)
This commit is contained in:
N3WT DE COMPET
2025-05-03 21:37:41 +02:00
parent 256f995698
commit 0f49236965
13 changed files with 426 additions and 177 deletions

View File

@ -10,9 +10,10 @@ import LevelLabel from '@/components/CustomLabels/LevelLabel';
import { DndProvider, useDrop } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import logger from '@/utils/logger';
import ClasseDetails from '@/components/ClasseDetails';
import SectionHeader from '@/components/SectionHeader';
import { useEstablishment } from '@/context/EstablishmentContext';
import { useRouter } from 'next/navigation';
import { FE_ADMIN_STRUCTURE_SCHOOLCLASS_MANAGEMENT_URL } from '@/utils/Url';
const ItemTypes = {
TEACHER: 'teacher',
@ -28,8 +29,6 @@ const TeachersDropZone = ({
classe.teachers_details || []
);
const { selectedEstablishmentId } = useEstablishment();
useEffect(() => {}, [teachers]);
useEffect(() => {
@ -131,6 +130,10 @@ const ClassesSection = ({
const [detailsModalVisible, setDetailsModalVisible] = useState(false);
const [selectedClass, setSelectedClass] = useState(null);
const router = useRouter();
const { selectedEstablishmentId } = useEstablishment();
const niveauxPremierCycle = [
{ id: 1, name: 'TPS', age: 2 },
{ id: 2, name: 'PS', age: 3 },
@ -520,7 +523,10 @@ const ClassesSection = ({
</button>
<button
type="button"
onClick={() => openEditModalDetails(classe)}
onClick={() => {
const url = `${FE_ADMIN_STRUCTURE_SCHOOLCLASS_MANAGEMENT_URL}?schoolClassId=${classe.id}`;
router.push(`${url}`);
}}
className="text-gray-500 hover:text-gray-700"
>
<ZoomIn className="w-5 h-5" />
@ -559,15 +565,6 @@ const ClassesSection = ({
columns={columns}
renderCell={renderClassCell}
/>
<Popup
visible={detailsModalVisible}
message={
selectedClass ? <ClasseDetails classe={selectedClass} /> : null
}
onConfirm={() => setDetailsModalVisible(false)}
onCancel={() => setDetailsModalVisible(false)}
uniqueConfirmButton={true}
/>
<Popup
visible={popupVisible}
message={popupMessage}