mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
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:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user