mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
fix: Suppression d'un profil uniquement s'il ne contient aucun guardian
rattaché à un élève qui n'en a pas d'autre
This commit is contained in:
@ -885,20 +885,9 @@ export default function Page({ params: { locale } }) {
|
||||
{
|
||||
name: t('mainContactMail'),
|
||||
transform: (row) =>
|
||||
row.student.guardians && row.student.guardians.length > 0 ? (
|
||||
row.student.guardians && row.student.guardians.length > 0 && (
|
||||
row.student.guardians[0].associated_profile_email
|
||||
) : (
|
||||
<div className="flex justify-center h-full">
|
||||
<button
|
||||
className="flex items-center gap-2 text-blue-600 font-semibold hover:text-blue-800 transition duration-200 underline decoration-blue-600 hover:decoration-blue-800"
|
||||
onClick={() => handleOpenAddGuardian(row.student)}
|
||||
>
|
||||
<span className="px-3 py-1 bg-blue-100 rounded-full hover:bg-blue-200 transition duration-200">
|
||||
Ajouter un responsable
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
),
|
||||
)
|
||||
},
|
||||
{
|
||||
name: t('phone'),
|
||||
|
||||
Reference in New Issue
Block a user