feat: Aussi pour la table des parents tant qu'à faire

This commit is contained in:
N3WT DE COMPET
2025-03-14 21:27:29 +01:00
parent 91976157e4
commit a3182c0ba7

View File

@ -85,26 +85,31 @@ const ProfileDirectory = ({ profileRoles, handleActivateProfile, handleDeletePro
)
},
{ name: 'Utilisateur', transform: (row) => (
<div className="flex flex-col justify-center space-y-2">
{row.associated_person?.guardian_name}
</div>
)
},
{ name: 'Elève(s) associé(s)', transform: (row) => (
<div className="flex items-center justify-center space-x-2">
<span>{row.associated_person?.guardian_name}</span>
{row.associated_person && (
<Tooltip content={
<div>
<div className="mb-2">
<strong>Elève(s) associé(s):</strong>
<div className="flex flex-col justify-center space-y-2">
{row.associated_person?.students?.map(student => (
<span key={student.student_name} className="px-2 py-1 rounded-full text-gray-800">
<div key={student.student_name} className="flex justify-between items-center">
<span className="px-2 py-1 rounded-full text-gray-800">
{student.student_name}
</span>
<StatusLabel status={student.registration_status} showDropdown={false} />
</div>
))}
</div>
)
},
{ name: 'Etat du dossier d\'inscription', transform: (row) => (
<div className="flex flex-col justify-center items-center space-y-2">
{row.associated_person?.students?.map(student => (
<StatusLabel key={student.student_name} status={student.registration_status} showDropdown={false} />
))}
</div>
</div>
}>
<button className="text-blue-500 hover:text-blue-700">
<Info className="w-5 h-5" />
</button>
</Tooltip>
)}
</div>
)
},
@ -142,6 +147,7 @@ const ProfileDirectory = ({ profileRoles, handleActivateProfile, handleDeletePro
{ name: 'Utilisateur', transform: (row) => (
<div className="flex items-center justify-center space-x-2">
<span>{row.associated_person?.teacher_name}</span>
{row.associated_person && (
<Tooltip content={
<div>
<div className="mb-2">
@ -168,6 +174,7 @@ const ProfileDirectory = ({ profileRoles, handleActivateProfile, handleDeletePro
<Info className="w-5 h-5" />
</button>
</Tooltip>
)}
</div>
)
},