mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
refactor: Partie FRONT / School
This commit is contained in:
@ -5,34 +5,34 @@ const TeachersSelectionConfiguration = ({ formData, teachers, handleTeacherSelec
|
||||
return (
|
||||
<div className="mt-4" style={{ maxHeight: '300px', overflowY: 'auto' }}>
|
||||
<label className="mt-6 block text-2xl font-medium text-gray-700 mb-2">Enseignants</label>
|
||||
<label className={`block text-sm font-medium mb-4`}>Sélection : <span className={`${formData.enseignants_ids.length !== 0 ? 'text-emerald-400' : 'text-red-300'}`}>{formData.enseignants_ids.length}</span></label>
|
||||
<label className={`block text-sm font-medium mb-4`}>Sélection : <span className={`${formData.teachers.length !== 0 ? 'text-emerald-400' : 'text-red-300'}`}>{formData.teachers.length}</span></label>
|
||||
<Table
|
||||
columns={[
|
||||
{
|
||||
name: 'Nom',
|
||||
transform: (row) => row.nom,
|
||||
transform: (row) => row.last_name,
|
||||
},
|
||||
{
|
||||
name: 'Prénom',
|
||||
transform: (row) => row.prenom,
|
||||
},
|
||||
{
|
||||
name: 'Spécialités',
|
||||
transform: (row) => (
|
||||
<div className="flex flex-wrap items-center">
|
||||
{row.specialites.map(specialite => (
|
||||
<span key={specialite.id} className="flex items-center mr-2 mb-1">
|
||||
<div
|
||||
className="w-4 h-4 rounded-full mr-2"
|
||||
style={{ backgroundColor: specialite.codeCouleur }}
|
||||
title={specialite.nom}
|
||||
></div>
|
||||
<span>{specialite.nom}</span>
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
),
|
||||
transform: (row) => row.first_name,
|
||||
},
|
||||
// {
|
||||
// name: 'Spécialités',
|
||||
// transform: (row) => (
|
||||
// <div className="flex flex-wrap items-center">
|
||||
// {row.specialites.map(specialite => (
|
||||
// <span key={specialite.id} className="flex items-center mr-2 mb-1">
|
||||
// <div
|
||||
// className="w-4 h-4 rounded-full mr-2"
|
||||
// style={{ backgroundColor: specialite.codeCouleur }}
|
||||
// title={specialite.nom}
|
||||
// ></div>
|
||||
// <span>{specialite.nom}</span>
|
||||
// </span>
|
||||
// ))}
|
||||
// </div>
|
||||
// ),
|
||||
// },
|
||||
]}
|
||||
data={teachers}
|
||||
onRowClick={handleTeacherSelection}
|
||||
|
||||
Reference in New Issue
Block a user