mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
refactor: Transformation des requetes vers le back en action ajout des
erreurs 400 et refresh lors d'un envoie de formulaire
This commit is contained in:
@ -1,49 +0,0 @@
|
||||
'use client'
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import Table from '@/components/Table';
|
||||
import Button from '@/components/Button';
|
||||
|
||||
const columns = [
|
||||
{ name: 'Nom', transform: (row) => row.Nom },
|
||||
{ name: 'Niveau', transform: (row) => row.Niveau },
|
||||
{ name: 'Effectif', transform: (row) => row.Effectif },
|
||||
];
|
||||
|
||||
export default function Page() {
|
||||
const [classes, setClasses] = useState([]);
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [totalPages, setTotalPages] = useState(1);
|
||||
|
||||
useEffect(() => {
|
||||
fetchClasses();
|
||||
}, [currentPage]);
|
||||
|
||||
const fetchClasses = async () => {
|
||||
const fakeData = {
|
||||
classes: [
|
||||
{ Nom: 'Classe A', Niveau: '1ère année', Effectif: 30 },
|
||||
{ Nom: 'Classe B', Niveau: '2ème année', Effectif: 25 },
|
||||
{ Nom: 'Classe C', Niveau: '3ème année', Effectif: 28 },
|
||||
],
|
||||
totalPages: 3
|
||||
};
|
||||
setClasses(fakeData.classes);
|
||||
setTotalPages(fakeData.totalPages);
|
||||
};
|
||||
|
||||
const handlePageChange = (page) => {
|
||||
setCurrentPage(page);
|
||||
};
|
||||
|
||||
const handleCreateClass = () => {
|
||||
console.log('Créer une nouvelle classe');
|
||||
};
|
||||
|
||||
return (
|
||||
<div className='p-8'>
|
||||
<h1 className='heading-section'>Gestion des Classes</h1>
|
||||
<Button text="Créer une nouvelle classe" onClick={handleCreateClass} primary />
|
||||
<Table data={classes} columns={columns} itemsPerPage={5} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -4,8 +4,8 @@ import React, { useState, useEffect } from 'react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Users, Clock, CalendarCheck, School, TrendingUp, UserCheck } from 'lucide-react';
|
||||
import Loader from '@/components/Loader';
|
||||
import { BE_SCHOOL_SCHOOLCLASSES_URL } from '@/utils/Url';
|
||||
import ClasseDetails from '@/components/ClasseDetails';
|
||||
import { fetchClasses } from '@/app/lib/schoolAction';
|
||||
|
||||
// Composant StatCard pour afficher une statistique
|
||||
const StatCard = ({ title, value, icon, change, color = "blue" }) => (
|
||||
@ -58,20 +58,15 @@ export default function DashboardPage() {
|
||||
|
||||
const [classes, setClasses] = useState([]);
|
||||
|
||||
const fetchClasses = () => {
|
||||
fetch(`${BE_SCHOOL_SCHOOLCLASSES_URL}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
useEffect(() => {
|
||||
// Fetch data for classes
|
||||
fetchClasses().then(data => {
|
||||
setClasses(data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching classes:', error);
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
// Fetch data for classes
|
||||
fetchClasses();
|
||||
|
||||
// Simulation de chargement des données
|
||||
setTimeout(() => {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
import { useSearchParams, useRouter } from 'next/navigation';
|
||||
import InscriptionFormShared from '@/components/Inscription/InscriptionFormShared';
|
||||
import { FE_ADMIN_SUBSCRIPTIONS_URL } from '@/utils/Url';
|
||||
import useCsrfToken from '@/hooks/useCsrfToken';
|
||||
@ -10,6 +10,7 @@ import { editRegisterForm, fetchRegisterForm } from '@/app/lib/subscriptionActio
|
||||
const useFakeData = process.env.NEXT_PUBLIC_USE_FAKE_DATA === 'true';
|
||||
|
||||
export default function Page() {
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
const idProfil = searchParams.get('id');
|
||||
const studentId = searchParams.get('studentId'); // Changé de codeDI à studentId
|
||||
@ -21,50 +22,44 @@ export default function Page() {
|
||||
useEffect(() => {
|
||||
if (useFakeData) {
|
||||
setInitialData(mockStudent);
|
||||
setIsLoading(false);
|
||||
} else {
|
||||
fetchRegisterForm(studentId)
|
||||
.then(data => {
|
||||
console.log('Fetched data:', data); // Pour le débogage
|
||||
const formattedData = {
|
||||
id: data.id,
|
||||
last_name: data.last_name,
|
||||
first_name: data.first_name,
|
||||
address: data.address,
|
||||
birth_date: data.birth_date,
|
||||
birth_place: data.birth_place,
|
||||
birth_postal_code: data.birth_postal_code,
|
||||
nationality: data.nationality,
|
||||
attending_physician: data.attending_physician,
|
||||
level: data.level,
|
||||
...data,
|
||||
guardians: data.guardians || []
|
||||
};
|
||||
setInitialData(formattedData);
|
||||
setIsLoading(false);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching student data:', error);
|
||||
setIsLoading(false);
|
||||
});
|
||||
}
|
||||
setIsLoading(false);
|
||||
}, [studentId]); // Dépendance changée à studentId
|
||||
|
||||
const handleSubmit = async (data) => {
|
||||
const handleSubmit = (data) => {
|
||||
if (useFakeData) {
|
||||
console.log('Fake submit:', data);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await editRegisterForm(studentId, data, csrfToken);
|
||||
// Utilisation de studentId
|
||||
editRegisterForm(studentId, data, csrfToken)
|
||||
|
||||
.then((result) => {
|
||||
console.log('Success:', result);
|
||||
// Redirection après succès
|
||||
window.location.href = FE_ADMIN_SUBSCRIPTIONS_URL;
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
router.push(FE_ADMIN_SUBSCRIPTIONS_URL);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error.message);
|
||||
if (error.details) {
|
||||
console.error('Form errors:', error.details);
|
||||
// Handle form errors (e.g., display them to the user)
|
||||
}
|
||||
alert('Une erreur est survenue lors de la mise à jour des données');
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@ -27,6 +27,7 @@ import {
|
||||
archiveRegisterForm,
|
||||
fetchRegisterFormFileTemplate,
|
||||
deleteRegisterFormFileTemplate,
|
||||
createRegistrationFormFileTemplate,
|
||||
fetchStudents,
|
||||
editRegisterForm } from "@/app/lib/subscriptionAction"
|
||||
|
||||
@ -44,16 +45,14 @@ const useFakeData = process.env.NEXT_PUBLIC_USE_FAKE_DATA === 'true';
|
||||
|
||||
export default function Page({ params: { locale } }) {
|
||||
const t = useTranslations('subscriptions');
|
||||
const [ficheInscriptions, setFicheInscriptions] = useState([]);
|
||||
const [fichesInscriptionsDataEnCours, setFichesInscriptionsDataEnCours] = useState([]);
|
||||
const [fichesInscriptionsDataInscrits, setFichesInscriptionsDataInscrits] = useState([]);
|
||||
const [fichesInscriptionsDataArchivees, setFichesInscriptionsDataArchivees] = useState([]);
|
||||
const [registrationForms, setRegistrationForms] = useState([]);
|
||||
const [registrationFormsDataPending, setRegistrationFormsDataPending] = useState([]);
|
||||
const [registrationFormsDataSubscribed, setRegistrationFormsDataSubscribed] = useState([]);
|
||||
const [registrationFormsDataArchived, setRegistrationFormsDataArchived] = useState([]);
|
||||
// const [filter, setFilter] = useState('*');
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
const [alertPage, setAlertPage] = useState(false);
|
||||
const [mailSent, setMailSent] = useState(false);
|
||||
const [ficheArchivee, setFicheArchivee] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [popup, setPopup] = useState({ visible: false, message: '', onConfirm: null });
|
||||
const [activeTab, setActiveTab] = useState('pending');
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
@ -64,13 +63,12 @@ export default function Page({ params: { locale } }) {
|
||||
const [itemsPerPage, setItemsPerPage] = useState(5); // Définir le nombre d'éléments par page
|
||||
|
||||
const [fichiers, setFichiers] = useState([]);
|
||||
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [isOpenAffectationClasse, setIsOpenAffectationClasse] = useState(false);
|
||||
const [student, setStudent] = useState('');
|
||||
const [classes, setClasses] = useState([]);
|
||||
const [students, setEleves] = useState([]);
|
||||
const [reloadFetch, setReloadFetch] = useState(false);
|
||||
|
||||
const csrfToken = useCsrfToken();
|
||||
|
||||
@ -80,6 +78,7 @@ export default function Page({ params: { locale } }) {
|
||||
|
||||
const closeModal = () => {
|
||||
setIsOpen(false);
|
||||
|
||||
}
|
||||
|
||||
const openModalAssociationEleve = (eleveSelected) => {
|
||||
@ -88,58 +87,72 @@ export default function Page({ params: { locale } }) {
|
||||
}
|
||||
|
||||
const requestErrorHandler = (err)=>{
|
||||
setIsLoading(false);
|
||||
console.error('Error fetching data:', err);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the pending data for the registration form.
|
||||
*
|
||||
* @param {Object} data - The data object containing registration forms and count.
|
||||
* @param {Array} data.registerForms - The array of registration forms.
|
||||
* @param {number} data.count - The total count of registration forms.
|
||||
*/
|
||||
const registerFormPendingDataHandler = (data) => {
|
||||
setIsLoading(false);
|
||||
if (data) {
|
||||
const { registerForms, count } = data;
|
||||
const { registerForms, count, page_size } = data;
|
||||
if (registerForms) {
|
||||
setFichesInscriptionsDataEnCours(registerForms);
|
||||
setRegistrationFormsDataPending(registerForms);
|
||||
}
|
||||
const calculatedTotalPages = count === 0 ? 1 : Math.ceil(count / pageSize);
|
||||
const calculatedTotalPages = count === 0 ? 1 : Math.ceil(count / page_size);
|
||||
setTotalPending(count);
|
||||
setTotalPages(calculatedTotalPages);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Handles the data received from the subscription registration form.
|
||||
*
|
||||
* @param {Object} data - The data object received from the subscription registration form.
|
||||
* @param {Array} data.registerForms - An array of registration forms.
|
||||
* @param {number} data.count - The total count of subscribed forms.
|
||||
*/
|
||||
const registerFormSubscribedDataHandler = (data) => {
|
||||
setIsLoading(false);
|
||||
if (data) {
|
||||
const { registerForms, count } = data;
|
||||
const { registerForms, count, page_size } = data;
|
||||
setTotalSubscribed(count);
|
||||
if (registerForms) {
|
||||
setFichesInscriptionsDataInscrits(registerForms);
|
||||
setRegistrationFormsDataSubscribed(registerForms);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handles the archived data for the register form.
|
||||
*
|
||||
* @param {Object} data - The data object containing archived register forms and count.
|
||||
* @param {Array} data.registerForms - The array of archived register forms.
|
||||
* @param {number} data.count - The total count of archived register forms.
|
||||
*/
|
||||
const registerFormArchivedDataHandler = (data) => {
|
||||
setIsLoading(false);
|
||||
if (data) {
|
||||
const { registerForms, count } = data;
|
||||
const { registerForms, count, page_size } = data;
|
||||
|
||||
setTotalArchives(count);
|
||||
if (registerForms) {
|
||||
setFichesInscriptionsDataArchivees(registerForms);
|
||||
setRegistrationFormsDataArchived(registerForms);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
fetchRegisterFormFileTemplate()
|
||||
.then((data)=> {setFichiers(data)})
|
||||
.catch((err)=>{ err = err.message; console.log(err);});
|
||||
}, []);
|
||||
// TODO: revoir le système de pagination et de UseEffect
|
||||
|
||||
useEffect(() => {
|
||||
fetchClasses()
|
||||
.then(data => {
|
||||
setClasses(data);
|
||||
console.log("Success CLASSES : ", data)
|
||||
console.log('Success Classes:', data);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching classes:', error);
|
||||
@ -154,10 +167,13 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
error = error.message;
|
||||
console.log(error);
|
||||
});
|
||||
}, [fichesInscriptionsDataEnCours]);
|
||||
}, [registrationFormsDataPending]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const fetchDataAndSetState = () => {
|
||||
|
||||
setIsLoading(true);
|
||||
if (!useFakeData) {
|
||||
fetchRegisterForms(PENDING, currentPage, itemsPerPage, searchTerm)
|
||||
.then(registerFormPendingDataHandler)
|
||||
@ -168,30 +184,73 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
fetchRegisterForms(ARCHIVED)
|
||||
.then(registerFormArchivedDataHandler)
|
||||
.catch(requestErrorHandler)
|
||||
fetchRegisterFormFileTemplate()
|
||||
.then((data)=> {setFichiers(data)})
|
||||
.catch((err)=>{ err = err.message; console.log(err);});
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
setFichesInscriptionsDataEnCours(mockFicheInscription);
|
||||
setIsLoading(false);
|
||||
setRegistrationFormsDataPending(mockFicheInscription);
|
||||
}, 1000);
|
||||
}
|
||||
setFicheArchivee(false);
|
||||
setMailSent(false);
|
||||
setIsLoading(false);
|
||||
setReloadFetch(false);
|
||||
};
|
||||
|
||||
|
||||
fetchDataAndSetState();
|
||||
}, [mailSent, ficheArchivee, currentPage, itemsPerPage]);
|
||||
}, [reloadFetch, currentPage]);
|
||||
|
||||
// Modifier le useEffect pour la recherche
|
||||
useEffect(() => {
|
||||
const timeoutId = setTimeout(() => {
|
||||
fetchRegisterForms(PENDING, currentPage, itemsPerPage, searchTerm)
|
||||
.then(registerFormPendingDataHandler)
|
||||
.catch(requestErrorHandler)
|
||||
useEffect(() => {
|
||||
const fetchDataAndSetState = () => {
|
||||
|
||||
setIsLoading(true);
|
||||
if (!useFakeData) {
|
||||
fetchRegisterForms(PENDING, currentPage, itemsPerPage, searchTerm)
|
||||
.then(registerFormPendingDataHandler)
|
||||
.catch(requestErrorHandler)
|
||||
fetchRegisterForms(SUBSCRIBED)
|
||||
.then(registerFormSubscribedDataHandler)
|
||||
.catch(requestErrorHandler)
|
||||
fetchRegisterForms(ARCHIVED)
|
||||
.then(registerFormArchivedDataHandler)
|
||||
.catch(requestErrorHandler)
|
||||
fetchRegisterFormFileTemplate()
|
||||
.then((data)=> {setFichiers(data)})
|
||||
.catch((err)=>{ err = err.message; console.log(err);});
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
setRegistrationFormsDataPending(mockFicheInscription);
|
||||
}, 1000);
|
||||
}
|
||||
setIsLoading(false);
|
||||
setReloadFetch(false);
|
||||
};
|
||||
|
||||
const timeoutId = setTimeout(() => {
|
||||
fetchDataAndSetState();
|
||||
}, 500); // Debounce la recherche
|
||||
|
||||
return () => clearTimeout(timeoutId);
|
||||
}, [searchTerm, currentPage, itemsPerPage]);
|
||||
}, [searchTerm]);
|
||||
|
||||
/**
|
||||
* UseEffect to update page count of tab
|
||||
*/
|
||||
useEffect(()=>{
|
||||
if (activeTab === 'pending') {
|
||||
setTotalPages(Math.ceil(totalPending / itemsPerPage));
|
||||
} else if (activeTab === 'subscribed') {
|
||||
setTotalPages(Math.ceil(totalSubscribed / itemsPerPage));
|
||||
} else if (activeTab === 'archived') {
|
||||
setTotalPages(Math.ceil(totalArchives / itemsPerPage));
|
||||
}
|
||||
},[currentPage]);
|
||||
/**
|
||||
* Archives a registration form after user confirmation.
|
||||
*
|
||||
* @param {number} id - The ID of the registration form to be archived.
|
||||
* @param {string} nom - The last name of the person whose registration form is being archived.
|
||||
* @param {string} prenom - The first name of the person whose registration form is being archived.
|
||||
*/
|
||||
const archiveFicheInscription = (id, nom, prenom) => {
|
||||
setPopup({
|
||||
visible: true,
|
||||
@ -200,8 +259,8 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
archiveRegisterForm(id)
|
||||
.then(data => {
|
||||
console.log('Success:', data);
|
||||
setFicheInscriptions(ficheInscriptions.filter(fiche => fiche.id !== id));
|
||||
setFicheArchivee(true);
|
||||
setRegistrationForms(registrationForms.filter(fiche => fiche.id !== id));
|
||||
setReloadFetch(true);
|
||||
alert("Le dossier d'inscription a été correctement archivé");
|
||||
})
|
||||
.catch(error => {
|
||||
@ -219,7 +278,7 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
onConfirm: () => {
|
||||
sendRegisterForm(id).then(data => {
|
||||
console.log('Success:', data);
|
||||
setMailSent(true);
|
||||
setReloadFetch(true);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching data:', error);
|
||||
@ -227,15 +286,18 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const affectationClassFormSubmitHandler = (formdata)=> {
|
||||
editRegisterForm(student.id,formData, csrfToken)
|
||||
.then(data => {
|
||||
console.log('Success:', data);
|
||||
setReloadFetch(true);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error :', error);
|
||||
});
|
||||
}
|
||||
|
||||
const updateStatusAction = (id, newStatus) => {
|
||||
console.log('Edit fiche inscription with id:', id);
|
||||
};
|
||||
@ -246,11 +308,11 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
|
||||
const handlePageChange = (newPage) => {
|
||||
setCurrentPage(newPage);
|
||||
fetchData(newPage, itemsPerPage); // Appeler fetchData directement ici
|
||||
};
|
||||
|
||||
const createRF = (updatedData) => {
|
||||
console.log("updateDATA",updatedData);
|
||||
console.log('createRF updatedData:', updatedData);
|
||||
|
||||
if (updatedData.selectedGuardians.length !== 0) {
|
||||
const selectedGuardiansIds = updatedData.selectedGuardians.map(guardianId => guardianId)
|
||||
|
||||
@ -263,10 +325,9 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
};
|
||||
|
||||
createRegisterForm(data,csrfToken)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log('Success:', data);
|
||||
setFichesInscriptionsDataEnCours(prevState => {
|
||||
setRegistrationFormsDataPending(prevState => {
|
||||
if (prevState) {
|
||||
return [...prevState, data];
|
||||
}
|
||||
@ -291,7 +352,7 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
is_active: 0, // On rend le profil inactif : impossible de s'y connecter dans la fenêtre du login tant qu'il ne s'est pas inscrit
|
||||
droit:2 // Profil PARENT
|
||||
}
|
||||
createProfile(data,csrfToken)
|
||||
createProfile(data,csrfToken)
|
||||
.then(response => {
|
||||
console.log('Success:', response);
|
||||
if (response.id) {
|
||||
@ -315,7 +376,7 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
createRegisterForm(data,csrfToken)
|
||||
.then(data => {
|
||||
console.log('Success:', data);
|
||||
setFichesInscriptionsDataEnCours(prevState => {
|
||||
setRegistrationFormsDataPending(prevState => {
|
||||
if (prevState && prevState.length > 0) {
|
||||
return [...prevState, data];
|
||||
}
|
||||
@ -338,6 +399,7 @@ const registerFormArchivedDataHandler = (data) => {
|
||||
});
|
||||
}
|
||||
closeModal();
|
||||
setReloadFetch(true);
|
||||
}
|
||||
|
||||
|
||||
@ -349,10 +411,10 @@ const columns = [
|
||||
{ name: t('phone'), transform: (row) => formatPhoneNumber(row.student.guardians[0].phone) },
|
||||
{ name: t('lastUpdateDate'), transform: (row) => row.formatted_last_update},
|
||||
{ name: t('registrationFileStatus'), transform: (row) => (
|
||||
<div className="flex justify-center items-center h-full">
|
||||
<StatusLabel etat={row.status} onChange={(newStatus) => updateStatusAction(row.student.id, newStatus)} showDropdown={false} />
|
||||
</div>
|
||||
)
|
||||
<div className="flex justify-center items-center h-full">
|
||||
<StatusLabel status={row.status} onChange={(newStatus) => updateStatusAction(row.student.id, newStatus)} showDropdown={false} />
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{ name: t('files'), transform: (row) =>
|
||||
(row.registerForms != null) &&(
|
||||
@ -431,7 +493,7 @@ const columnsSubscribed = [
|
||||
{ name: t('registrationFileStatus'), transform: (row) =>
|
||||
(
|
||||
<div className="flex justify-center items-center h-full">
|
||||
<StatusLabel etat={row.status} onChange={(newStatus) => updateStatusAction(row.student.id, newStatus)} showDropdown={false} />
|
||||
<StatusLabel status={row.status} onChange={(newStatus) => updateStatusAction(row.student.id, newStatus)} showDropdown={false} />
|
||||
</div>
|
||||
)
|
||||
},
|
||||
@ -513,10 +575,10 @@ const handleFileUpload = (file, fileName) => {
|
||||
|
||||
const formData = new FormData();
|
||||
if(file){
|
||||
formData.append('fichier', file);
|
||||
formData.append('file', file);
|
||||
}
|
||||
formData.append('nom', fileName);
|
||||
createRegisterFormFileTemplate(formData,csrfToken)
|
||||
formData.append('name', fileName);
|
||||
createRegistrationFormFileTemplate(formData,csrfToken)
|
||||
.then(data => {
|
||||
console.log('Success:', data);
|
||||
setFichiers([...fichiers, data]);
|
||||
@ -530,7 +592,7 @@ const handleFileUpload = (file, fileName) => {
|
||||
if (isLoading) {
|
||||
return <Loader />;
|
||||
} else {
|
||||
if (ficheInscriptions.length === 0 && fichesInscriptionsDataArchivees.length === 0 && alertPage) {
|
||||
if (registrationForms.length === 0 && registrationFormsDataArchived.length === 0 && alertPage) {
|
||||
return (
|
||||
<div className='p-8'>
|
||||
<AlertWithModal
|
||||
@ -616,10 +678,10 @@ const handleFileUpload = (file, fileName) => {
|
||||
key={`${currentPage}-${searchTerm}`}
|
||||
data={
|
||||
activeTab === 'pending'
|
||||
? fichesInscriptionsDataEnCours
|
||||
? registrationFormsDataPending
|
||||
: activeTab === 'subscribed'
|
||||
? fichesInscriptionsDataInscrits
|
||||
: fichesInscriptionsDataArchivees
|
||||
? registrationFormsDataSubscribed
|
||||
: registrationFormsDataArchived
|
||||
}
|
||||
columns={
|
||||
activeTab === 'subscribed'
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
'use client'
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import Button from '@/components/Button';
|
||||
import { MoreVertical, Send, Edit, Trash2, FileText, ChevronUp, UserPlus } from 'lucide-react';
|
||||
import Modal from '@/components/Modal';
|
||||
|
||||
export default function Page() {
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
|
||||
const openModal = () => {
|
||||
setIsOpen(true);
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<div className='p-8'>
|
||||
|
||||
<Button text={"addTeacher"} primary onClick={openModal} icon={<UserPlus size={20} />} />
|
||||
<Modal isOpen={isOpen} setIsOpen={setIsOpen} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -3,11 +3,9 @@ import React, { useState, useEffect } from 'react';
|
||||
import InscriptionFormShared from '@/components/Inscription/InscriptionFormShared';
|
||||
import { useSearchParams, redirect, useRouter } from 'next/navigation';
|
||||
import useCsrfToken from '@/hooks/useCsrfToken';
|
||||
import { FE_PARENTS_HOME_URL,
|
||||
BE_SUBSCRIPTION_STUDENT_URL,
|
||||
BE_SUBSCRIPTION_REGISTERFORM_URL,
|
||||
BE_SUBSCRIPTION_LAST_GUARDIAN_URL } from '@/utils/Url';
|
||||
import { FE_PARENTS_HOME_URL} from '@/utils/Url';
|
||||
import { mockStudent } from '@/data/mockStudent';
|
||||
import { fetchLastGuardian, fetchRegisterForm } from '@/app/lib/subscriptionAction';
|
||||
|
||||
const useFakeData = process.env.NEXT_PUBLIC_USE_FAKE_DATA === 'true';
|
||||
|
||||
@ -21,7 +19,7 @@ export default function Page() {
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const csrfToken = useCsrfToken();
|
||||
const [currentProfil, setCurrentProfil] = useState("");
|
||||
const [lastIdResponsable, setLastIdResponsable] = useState(1);
|
||||
const [lastGuardianId, setLastGuardianId] = useState(1);
|
||||
|
||||
useEffect(() => {
|
||||
if (!studentId || !idProfil) {
|
||||
@ -31,37 +29,25 @@ export default function Page() {
|
||||
|
||||
if (useFakeData) {
|
||||
setInitialData(mockStudent);
|
||||
setLastIdResponsable(999);
|
||||
setLastGuardianId(999);
|
||||
setIsLoading(false);
|
||||
} else {
|
||||
Promise.all([
|
||||
// Fetch eleve data
|
||||
fetch(`${BE_SUBSCRIPTION_STUDENT_URL}/${studentId}`),
|
||||
// Fetch last responsable ID
|
||||
fetch(BE_SUBSCRIPTION_LAST_GUARDIAN_URL)
|
||||
fetchRegisterForm(studentId),
|
||||
// Fetch last guardian ID
|
||||
fetchLastGuardian()
|
||||
])
|
||||
.then(async ([eleveResponse, responsableResponse]) => {
|
||||
const eleveData = await eleveResponse.json();
|
||||
const responsableData = await responsableResponse.json();
|
||||
|
||||
const formattedData = {
|
||||
id: eleveData.id,
|
||||
nom: eleveData.nom,
|
||||
prenom: eleveData.prenom,
|
||||
adresse: eleveData.adresse,
|
||||
dateNaissance: eleveData.dateNaissance,
|
||||
lieuNaissance: eleveData.lieuNaissance,
|
||||
codePostalNaissance: eleveData.codePostalNaissance,
|
||||
nationalite: eleveData.nationalite,
|
||||
medecinTraitant: eleveData.medecinTraitant,
|
||||
niveau: eleveData.niveau,
|
||||
responsables: eleveData.responsables || []
|
||||
.then(async ([studentData, guardianData]) => {
|
||||
const formattedData = {
|
||||
...studentData,
|
||||
guardians: studentData.guardians || []
|
||||
};
|
||||
|
||||
setInitialData(formattedData);
|
||||
setLastIdResponsable(responsableData.lastid);
|
||||
setLastGuardianId(guardianData.lastid);
|
||||
|
||||
let profils = eleveData.profils;
|
||||
let profils = studentData.profils;
|
||||
const currentProf = profils.find(profil => profil.id === idProfil);
|
||||
if (currentProf) {
|
||||
setCurrentProfil(currentProf);
|
||||
@ -83,17 +69,8 @@ export default function Page() {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(`${BE_SUBSCRIPTION_REGISTERFORM_URL}/${studentId}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfToken
|
||||
},
|
||||
credentials: 'include',
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
|
||||
const result = await response.json();
|
||||
const result = await editRegisterForm(studentId, data, csrfToken);
|
||||
console.log('Success:', result);
|
||||
router.push(FE_PARENTS_HOME_URL);
|
||||
} catch (error) {
|
||||
|
||||
@ -67,7 +67,7 @@ export default function ParentHomePage() {
|
||||
<h3 className="text-lg font-semibold">{child.student.last_name} {child.student.first_name}</h3>
|
||||
<Edit className="cursor-pointer" onClick={() => handleEdit(child.student.id)} />
|
||||
</div>
|
||||
<StatusLabel etat={child.status } showDropdown={false}/>
|
||||
<StatusLabel status={child.status } showDropdown={false}/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@ -12,6 +12,20 @@ import {mockUser} from "@/data/mockUsersData";
|
||||
|
||||
const useFakeData = process.env.NEXT_PUBLIC_USE_FAKE_DATA === 'true';
|
||||
|
||||
|
||||
const requestResponseHandler = async (response) => {
|
||||
|
||||
const body = await response.json();
|
||||
if (response.ok) {
|
||||
return body;
|
||||
}
|
||||
// Throw an error with the JSON body containing the form errors
|
||||
const error = new Error('Form submission error');
|
||||
error.details = body;
|
||||
throw error;
|
||||
}
|
||||
|
||||
|
||||
export const login = (data, csrfToken) => {
|
||||
const request = new Request(
|
||||
`${BE_AUTH_LOGIN_URL}`,
|
||||
@ -25,7 +39,7 @@ export const login = (data, csrfToken) => {
|
||||
credentials: 'include',
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,7 +78,7 @@ const request = new Request(
|
||||
body: JSON.stringify(data),
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const updateProfile = (id, data, csrfToken) => {
|
||||
@ -80,7 +94,7 @@ export const updateProfile = (id, data, csrfToken) => {
|
||||
body: JSON.stringify(data),
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const sendNewPassword = (data, csrfToken) => {
|
||||
@ -97,7 +111,7 @@ export const sendNewPassword = (data, csrfToken) => {
|
||||
body: JSON.stringify(data),
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const subscribe = (data,csrfToken) =>{
|
||||
@ -113,7 +127,7 @@ export const subscribe = (data,csrfToken) =>{
|
||||
body: JSON.stringify( data),
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const resetPassword = (uuid, data, csrfToken) => {
|
||||
@ -129,7 +143,7 @@ export const resetPassword = (uuid, data, csrfToken) => {
|
||||
body: JSON.stringify(data),
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const getResetPassword = (uuid) => {
|
||||
@ -138,5 +152,5 @@ export const getResetPassword = (uuid) => {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
}).then(response => response.json())
|
||||
}).then(requestResponseHandler)
|
||||
}
|
||||
@ -5,22 +5,35 @@ import {
|
||||
BE_SCHOOL_PLANNINGS_URL
|
||||
} from '@/utils/Url';
|
||||
|
||||
const requestResponseHandler = async (response) => {
|
||||
|
||||
const body = await response.json();
|
||||
if (response.ok) {
|
||||
return body;
|
||||
}
|
||||
// Throw an error with the JSON body containing the form errors
|
||||
const error = new Error('Form submission error');
|
||||
error.details = body;
|
||||
throw error;
|
||||
}
|
||||
|
||||
|
||||
export const fetchSpecialities = () => {
|
||||
return fetch(`${BE_SCHOOL_SPECIALITIES_URL}`)
|
||||
.then(response => response.json())
|
||||
.then(requestResponseHandler)
|
||||
};
|
||||
|
||||
export const fetchTeachers = () => {
|
||||
return fetch(`${BE_SCHOOL_TEACHERS_URL}`)
|
||||
.then(response => response.json())
|
||||
.then(requestResponseHandler)
|
||||
};
|
||||
|
||||
export const fetchClasses = () => {
|
||||
return fetch(`${BE_SCHOOL_SCHOOLCLASSES_URL}`)
|
||||
.then(response => response.json())
|
||||
.then(requestResponseHandler)
|
||||
};
|
||||
|
||||
export const fetchSchedules = () => {
|
||||
return fetch(`${BE_SCHOOL_PLANNINGS_URL}`)
|
||||
.then(response => response.json())
|
||||
.then(requestResponseHandler)
|
||||
};
|
||||
@ -6,7 +6,8 @@ import {
|
||||
BE_SUBSCRIPTION_CHILDRENS_URL,
|
||||
BE_SUBSCRIPTION_REGISTERFORM_URL,
|
||||
BE_SUBSCRIPTION_REGISTERFORMS_URL,
|
||||
BE_SUBSCRIPTION_REGISTERFORMFILE_TEMPLATE_URL
|
||||
BE_SUBSCRIPTION_REGISTRATIONFORMFILE_TEMPLATE_URL,
|
||||
BE_SUBSCRIPTION_LAST_GUARDIAN_URL
|
||||
} from '@/utils/Url';
|
||||
|
||||
export const PENDING = 'pending';
|
||||
@ -14,6 +15,18 @@ export const SUBSCRIBED = 'subscribed';
|
||||
export const ARCHIVED = 'archived';
|
||||
|
||||
|
||||
const requestResponseHandler = async (response) => {
|
||||
|
||||
const body = await response.json();
|
||||
if (response.ok) {
|
||||
return body;
|
||||
}
|
||||
// Throw an error with the JSON body containing the form errors
|
||||
const error = new Error('Form submission error');
|
||||
error.details = body;
|
||||
throw error;
|
||||
}
|
||||
|
||||
export const fetchRegisterForms = (type=PENDING, page='', pageSize='', search = '') => {
|
||||
let url = `${BE_SUBSCRIPTION_REGISTERFORMS_URL}/${type}`;
|
||||
if (page !== '' && pageSize !== '') {
|
||||
@ -23,12 +36,16 @@ export const fetchRegisterForms = (type=PENDING, page='', pageSize='', search =
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
}).then(response => response.json())
|
||||
}).then(requestResponseHandler)
|
||||
};
|
||||
|
||||
export const fetchRegisterForm = (id) =>{
|
||||
return fetch(`${BE_SUBSCRIPTION_STUDENT_URL}/${id}`) // Utilisation de studentId au lieu de codeDI
|
||||
.then(response => response.json())
|
||||
return fetch(`${BE_SUBSCRIPTION_STUDENT_URL}/${id}`) // Utilisation de studentId au lieu de codeDI
|
||||
.then(requestResponseHandler)
|
||||
}
|
||||
export const fetchLastGuardian = () =>{
|
||||
return fetch(`${BE_SUBSCRIPTION_LAST_GUARDIAN_URL}`)
|
||||
.then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const editRegisterForm=(id, data, csrfToken)=>{
|
||||
@ -42,7 +59,7 @@ export const editRegisterForm=(id, data, csrfToken)=>{
|
||||
body: JSON.stringify(data),
|
||||
credentials: 'include'
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(requestResponseHandler)
|
||||
|
||||
};
|
||||
|
||||
@ -57,7 +74,7 @@ export const createRegisterForm=(data, csrfToken)=>{
|
||||
body: JSON.stringify(data),
|
||||
credentials: 'include'
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const archiveRegisterForm = (id) => {
|
||||
@ -67,7 +84,7 @@ export const archiveRegisterForm = (id) => {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
}).then(response => response.json())
|
||||
}).then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const sendRegisterForm = (id) => {
|
||||
@ -76,13 +93,13 @@ export const sendRegisterForm = (id) => {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
}).then(response => response.json())
|
||||
}).then(requestResponseHandler)
|
||||
|
||||
}
|
||||
|
||||
export const fetchRegisterFormFileTemplate = () => {
|
||||
const request = new Request(
|
||||
`${BE_SUBSCRIPTION_REGISTERFORMFILE_TEMPLATE_URL}`,
|
||||
`${BE_SUBSCRIPTION_REGISTRATIONFORMFILE_TEMPLATE_URL}`,
|
||||
{
|
||||
method:'GET',
|
||||
headers: {
|
||||
@ -90,12 +107,12 @@ export const fetchRegisterFormFileTemplate = () => {
|
||||
},
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
};
|
||||
|
||||
export const createRegisterFormFileTemplate = (data,csrfToken) => {
|
||||
export const createRegistrationFormFileTemplate = (data,csrfToken) => {
|
||||
|
||||
fetch(`${BE_SUBSCRIPTION_REGISTERFORMFILE_TEMPLATE_URL}`, {
|
||||
return fetch(`${BE_SUBSCRIPTION_REGISTRATIONFORMFILE_TEMPLATE_URL}`, {
|
||||
method: 'POST',
|
||||
body: data,
|
||||
headers: {
|
||||
@ -103,11 +120,11 @@ export const createRegisterFormFileTemplate = (data,csrfToken) => {
|
||||
},
|
||||
credentials: 'include',
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(requestResponseHandler)
|
||||
}
|
||||
|
||||
export const deleteRegisterFormFileTemplate = (fileId,csrfToken) => {
|
||||
return fetch(`${BE_SUBSCRIPTION_REGISTERFORMFILE_TEMPLATE_URL}/${fileId}`, {
|
||||
return fetch(`${BE_SUBSCRIPTION_REGISTRATIONFORMFILE_TEMPLATE_URL}/${fileId}`, {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRFToken': csrfToken,
|
||||
@ -125,7 +142,7 @@ export const fetchStudents = () => {
|
||||
},
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
|
||||
};
|
||||
|
||||
@ -139,5 +156,5 @@ export const fetchChildren = (id) =>{
|
||||
},
|
||||
}
|
||||
);
|
||||
return fetch(request).then(response => response.json())
|
||||
return fetch(request).then(requestResponseHandler)
|
||||
}
|
||||
@ -2,7 +2,7 @@ import { useState } from 'react';
|
||||
import { ChevronUp } from 'lucide-react';
|
||||
import DropdownMenu from './DropdownMenu';
|
||||
|
||||
const StatusLabel = ({ etat, onChange, showDropdown = true }) => {
|
||||
const StatusLabel = ({ status, onChange, showDropdown = true }) => {
|
||||
const [dropdownOpen, setDropdownOpen] = useState(false);
|
||||
const statusOptions = [
|
||||
{ value: 1, label: 'Créé' },
|
||||
@ -13,7 +13,7 @@ const StatusLabel = ({ etat, onChange, showDropdown = true }) => {
|
||||
{ value: 6, label: 'Archivé' },
|
||||
];
|
||||
|
||||
const currentStatus = statusOptions.find(option => option.value === etat);
|
||||
const currentStatus = statusOptions.find(option => option.value === status);
|
||||
return (
|
||||
<>
|
||||
{showDropdown ? (
|
||||
@ -29,12 +29,12 @@ const StatusLabel = ({ etat, onChange, showDropdown = true }) => {
|
||||
onClick: () => onChange(option.value),
|
||||
}))}
|
||||
buttonClassName={`w-[150px] flex items-center justify-center gap-2 px-2 py-2 rounded-md text-sm text-center font-medium ${
|
||||
etat === 1 && 'bg-blue-50 text-blue-600' ||
|
||||
etat === 2 && 'bg-orange-50 text-orange-600' ||
|
||||
etat === 3 && 'bg-purple-50 text-purple-600' ||
|
||||
etat === 4 && 'bg-red-50 text-red-600' ||
|
||||
etat === 5 && 'bg-green-50 text-green-600' ||
|
||||
etat === 6 && 'bg-red-50 text-red-600'
|
||||
status === 1 && 'bg-blue-50 text-blue-600' ||
|
||||
status === 2 && 'bg-orange-50 text-orange-600' ||
|
||||
status === 3 && 'bg-purple-50 text-purple-600' ||
|
||||
status === 4 && 'bg-red-50 text-red-600' ||
|
||||
status === 5 && 'bg-green-50 text-green-600' ||
|
||||
status === 6 && 'bg-red-50 text-red-600'
|
||||
}`}
|
||||
menuClassName="absolute right-0 mt-2 w-48 bg-white border border-gray-200 rounded-md shadow-lg z-10"
|
||||
dropdownOpen={dropdownOpen}
|
||||
@ -42,12 +42,12 @@ const StatusLabel = ({ etat, onChange, showDropdown = true }) => {
|
||||
/>
|
||||
) : (
|
||||
<div className={`w-[150px] flex items-center justify-center gap-2 px-2 py-2 rounded-md text-sm text-center font-medium ${
|
||||
etat === 1 && 'bg-blue-50 text-blue-600' ||
|
||||
etat === 2 && 'bg-orange-50 text-orange-600' ||
|
||||
etat === 3 && 'bg-purple-50 text-purple-600' ||
|
||||
etat === 4 && 'bg-red-50 text-red-600' ||
|
||||
etat === 5 && 'bg-green-50 text-green-600' ||
|
||||
etat === 6 && 'bg-red-50 text-red-600'
|
||||
status === 1 && 'bg-blue-50 text-blue-600' ||
|
||||
status === 2 && 'bg-orange-50 text-orange-600' ||
|
||||
status === 3 && 'bg-purple-50 text-purple-600' ||
|
||||
status === 4 && 'bg-red-50 text-red-600' ||
|
||||
status === 5 && 'bg-green-50 text-green-600' ||
|
||||
status === 6 && 'bg-red-50 text-red-600'
|
||||
}`}>
|
||||
{currentStatus ? currentStatus.label : 'Statut inconnu'}
|
||||
</div>
|
||||
|
||||
7
Front-End/src/instrumentation.js
Normal file
7
Front-End/src/instrumentation.js
Normal file
@ -0,0 +1,7 @@
|
||||
export async function register() {
|
||||
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||
await require('pino')
|
||||
await require('next-logger')
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import createMiddleware from 'next-intl/middleware';
|
||||
import { routing } from '@/i18n/routing';
|
||||
|
||||
const middleware = createMiddleware(routing);
|
||||
|
||||
export default function handler(req) {
|
||||
|
||||
28
Front-End/src/next-logger.config.js
Normal file
28
Front-End/src/next-logger.config.js
Normal file
@ -0,0 +1,28 @@
|
||||
const pino = require('pino')
|
||||
|
||||
const PinoLevelToSeverityLookup = {
|
||||
trace: 'DEBUG',
|
||||
debug: 'DEBUG',
|
||||
info: 'INFO',
|
||||
warn: 'WARNING',
|
||||
error: 'ERROR',
|
||||
fatal: 'CRITICAL',
|
||||
};
|
||||
|
||||
const logger = defaultConfig =>
|
||||
pino({
|
||||
...defaultConfig,
|
||||
messageKey: 'message',
|
||||
formatters: {
|
||||
level(label, number) {
|
||||
return {
|
||||
severity: PinoLevelToSeverityLookup[label] || PinoLevelToSeverityLookup['info'],
|
||||
level: number,
|
||||
}
|
||||
},},
|
||||
mixin: () => ({ name: 'custom-pino-instance' }),
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
logger,
|
||||
}
|
||||
@ -22,7 +22,7 @@ export const BE_SUBSCRIPTION_SEND_URL = `${BASE_URL}/Subscriptions/send`
|
||||
export const BE_SUBSCRIPTION_ARCHIVE_URL = `${BASE_URL}/Subscriptions/archive`
|
||||
export const BE_SUBSCRIPTION_REGISTERFORM_URL = `${BASE_URL}/Subscriptions/registerForm`
|
||||
export const BE_SUBSCRIPTION_REGISTERFORMS_URL = `${BASE_URL}/Subscriptions/registerForms`
|
||||
export const BE_SUBSCRIPTION_REGISTERFORMFILE_TEMPLATE_URL = `${BASE_URL}/Subscriptions/registerFormFileTemplate`
|
||||
export const BE_SUBSCRIPTION_REGISTRATIONFORMFILE_TEMPLATE_URL = `${BASE_URL}/Subscriptions/registrationFileTemplates`
|
||||
export const BE_SUBSCRIPTION_LAST_GUARDIAN_URL = `${BASE_URL}/Subscriptions/lastGuardian`
|
||||
|
||||
//GESTION ENSEIGNANT
|
||||
|
||||
Reference in New Issue
Block a user