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