feat: Gestion des rattachements de Guardian à des RF déjà existants

This commit is contained in:
N3WT DE COMPET
2025-03-12 14:04:35 +01:00
parent 753a8d647e
commit 7d1b9c5657
10 changed files with 241 additions and 196 deletions

View File

@ -346,10 +346,10 @@ const InscriptionForm = ( { students, registrationDiscounts, tuitionDiscounts, r
type="checkbox"
checked={formData.selectedGuardians.includes(guardian.id)}
className="form-checkbox h-5 w-5 text-emerald-600"
onChange={() => handleResponsableSelection(guardian.id, guardian.email)}
onChange={() => handleResponsableSelection(guardian.id, guardian.associated_profile_email)}
/>
<span className="text-gray-900">
{guardian.last_name && guardian.first_name ? `${guardian.last_name} ${guardian.first_name}` : `${guardian.email}`}
{guardian.last_name && guardian.first_name ? `${guardian.last_name} ${guardian.first_name}` : `${guardian.associated_profile_email}`}
</span>
</label>
</div>
@ -563,7 +563,7 @@ const InscriptionForm = ( { students, registrationDiscounts, tuitionDiscounts, r
<tr key={guardian.id}>
<td className="px-4 py-2 border">{guardian.last_name}</td>
<td className="px-4 py-2 border">{guardian.first_name}</td>
<td className="px-4 py-2 border">{guardian.email}</td>
<td className="px-4 py-2 border">{guardian.associated_profile_email}</td>
</tr>
))}
</tbody>