chore: Suppression de champs requis lors de la création d'une classe

(non obligatoire pour la tranche d'age par exemple)
This commit is contained in:
N3WT DE COMPET
2025-05-22 19:08:40 +02:00
parent 87b8cf6c05
commit 3e5cebef44
2 changed files with 4 additions and 8 deletions

View File

@ -168,7 +168,7 @@ const ClassesSection = ({
atmosphere_name: '',
age_range: '',
levels: [],
number_of_students: '',
number_of_students: null,
school_year: '',
teachers: [],
establishment: selectedEstablishmentId,
@ -177,7 +177,7 @@ const ClassesSection = ({
atmosphere_name: '',
age_range: '',
levels: [],
number_of_students: '',
number_of_students: null,
school_year: '',
teachers: [],
establishment: selectedEstablishmentId,
@ -203,9 +203,7 @@ const ClassesSection = ({
const handleSaveNewClass = () => {
if (
newClass.atmosphere_name &&
newClass.age_range &&
newClass.levels.length > 0 &&
newClass.number_of_students &&
newClass.school_year
) {
handleCreate(newClass)
@ -242,9 +240,7 @@ const ClassesSection = ({
const handleUpdateClass = (id, updatedData) => {
if (
updatedData.atmosphere_name &&
updatedData.age_range &&
updatedData.levels.length > 0 &&
updatedData.number_of_students &&
updatedData.school_year
) {
handleEdit(id, updatedData)