mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
fix: Modification d'un guardian sans changer d'adresse mail (même
profil)
This commit is contained in:
@ -409,7 +409,6 @@ export default function CreateSubscriptionPage() {
|
||||
},
|
||||
last_name: formDataRef.current.guardianLastName,
|
||||
first_name: formDataRef.current.guardianFirstName,
|
||||
birth_date: formDataRef.current.guardianBirthDate,
|
||||
phone: formDataRef.current.guardianPhone,
|
||||
},
|
||||
];
|
||||
@ -418,7 +417,19 @@ export default function CreateSubscriptionPage() {
|
||||
logger.debug('Cas 4 : Profil existant avec le même email', {
|
||||
existingProfile,
|
||||
});
|
||||
return [];
|
||||
return [
|
||||
{
|
||||
profile_role_data: {
|
||||
establishment: selectedEstablishmentId,
|
||||
role_type: 2,
|
||||
is_active: true,
|
||||
profile: formDataRef.current.existingProfileId,
|
||||
},
|
||||
last_name: formDataRef.current.guardianLastName,
|
||||
first_name: formDataRef.current.guardianFirstName,
|
||||
phone: formDataRef.current.guardianPhone,
|
||||
},
|
||||
];
|
||||
}
|
||||
} else {
|
||||
// Cas 1 : Profil inexistant
|
||||
|
||||
Reference in New Issue
Block a user