fix: Ne pas dissocier de responsable s'il n'y en a pas d'autre rattaché

à l'élève
This commit is contained in:
N3WT DE COMPET
2025-05-03 15:35:52 +02:00
parent 2ab1684791
commit ac0672f334
5 changed files with 24 additions and 45 deletions

View File

@ -21,7 +21,6 @@ const InscriptionForm = ({
tuitionFees,
profiles,
onSubmit,
currentStep,
groups,
showOnlyStep2 = false,
}) => {
@ -54,7 +53,7 @@ const InscriptionForm = ({
};
});
const [step, setStep] = useState(currentStep || 1);
const [step, setStep] = useState(1);
const [selectedStudent, setSelectedEleve] = useState('');
const [existingGuardians, setExistingGuardians] = useState([]);
const [totalRegistrationAmount, setTotalRegistrationAmount] = useState(0);
@ -134,10 +133,6 @@ const InscriptionForm = ({
formDataRef.current = formData; // Mettre à jour la référence à chaque changement de formData
}, [formData]);
useEffect(() => {
setStep(currentStep || 1);
}, [currentStep]);
const handleToggleChange = () => {
setFormData({ ...formData, autoMail: !formData.autoMail });
};