mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
feat: Gestion des rattachements de Guardian à des RF déjà existants
This commit is contained in:
@ -170,7 +170,7 @@ useEffect(() => {
|
||||
const fetchInitialData = () => {
|
||||
Promise.all([
|
||||
fetchClasses(selectedEstablishmentId),
|
||||
fetchStudents(selectedEstablishmentId) // Utiliser l'ID de l'établissement ici
|
||||
fetchStudents(selectedEstablishmentId)
|
||||
])
|
||||
.then(([classesData, studentsData]) => {
|
||||
setClasses(classesData);
|
||||
@ -374,11 +374,11 @@ useEffect(()=>{
|
||||
last_name: updatedData.studentLastName,
|
||||
first_name: updatedData.studentFirstName,
|
||||
guardians: updatedData.selectedGuardians.length !== 0 ? updatedData.selectedGuardians.map(guardianId => ({ id: guardianId })) : [{
|
||||
profile_role: {
|
||||
profile_role_data: {
|
||||
establishment: selectedEstablishmentId,
|
||||
role_type: 2,
|
||||
is_active: false,
|
||||
profile: {
|
||||
profile_data: {
|
||||
email: updatedData.guardianEmail,
|
||||
password: 'Provisoire01!',
|
||||
username: updatedData.guardianEmail,
|
||||
|
||||
Reference in New Issue
Block a user