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

@ -70,6 +70,11 @@ export const ClassesProvider = ({ children }) => {
});
};
const getNiveauLabel = (level) => {
const niveau = allNiveaux.find((n) => n.id === level);
return niveau ? niveau.name : 'Niveau inconnu';
};
const getNiveauxTabs = (levels) => {
// Trier les levels par id
const sortedNiveaux = levels.sort((a, b) => a - b);
@ -232,6 +237,7 @@ export const ClassesProvider = ({ children }) => {
value={{
schoolYears,
getNiveauxLabels,
getNiveauLabel,
getNiveauxTabs,
generateAgeToNiveaux,
niveauxPremierCycle,