mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
fix: pagination annuaire
This commit is contained in:
@ -308,11 +308,6 @@ const ClassesSection = ({
|
||||
}
|
||||
};
|
||||
|
||||
const openEditModalDetails = (classe) => {
|
||||
setSelectedClass(classe);
|
||||
setDetailsModalVisible(true);
|
||||
};
|
||||
|
||||
const renderClassCell = (classe, column) => {
|
||||
const isEditing = editingClass === classe.id;
|
||||
const isCreating = newClass && newClass.id === classe.id;
|
||||
@ -427,7 +422,7 @@ const ClassesSection = ({
|
||||
return classe.age_range;
|
||||
case 'NIVEAUX':
|
||||
const levelLabels = Array.isArray(classe.levels)
|
||||
? getNiveauxLabels(classe.levels)
|
||||
? getNiveauxLabels(classe.levels.sort((a, b) => a - b)) // Trier les niveaux par ordre croissant
|
||||
: [];
|
||||
return (
|
||||
<div className="flex flex-wrap justify-center items-center space-x-2">
|
||||
|
||||
@ -24,18 +24,17 @@ const TeacherItem = ({ teacher, isDraggable = true }) => {
|
||||
return (
|
||||
<div
|
||||
ref={isDraggable ? drag : null}
|
||||
className={`inline-block px-3 py-1 rounded-lg font-bold text-white text-center transition-transform duration-200 ease-in-out ${
|
||||
isDragging ? 'opacity-30' : 'opacity-100'
|
||||
} ${isDraggable ? 'cursor-grabbing hover:shadow-lg hover:scale-105' : ''}`}
|
||||
style={{
|
||||
backgroundColor: isDragging
|
||||
? '#d1d5db'
|
||||
className={`inline-block px-4 py-2 rounded-full font-medium text-sm text-center transition-transform duration-200 ease-in-out ${
|
||||
isDragging ? 'opacity-50' : 'opacity-100'
|
||||
} ${
|
||||
isDraggable ? 'cursor-grabbing hover:shadow-md hover:scale-105' : ''
|
||||
} ${
|
||||
isDragging
|
||||
? 'bg-gradient-to-r from-emerald-100 to-emerald-200 border border-emerald-200'
|
||||
: isDraggable
|
||||
? '#10b981'
|
||||
: '#a7f3d0', // Change background color based on dragging state and draggable state
|
||||
border: isDraggable ? '1px solid #10b981' : '1px solid #a7f3d0', // Add a border
|
||||
boxShadow: isDraggable ? '0 2px 4px rgba(0, 0, 0, 0.1)' : 'none', // Add a shadow if draggable
|
||||
}}
|
||||
? 'bg-gradient-to-r from-emerald-400 to-emerald-300 border border-emerald-400'
|
||||
: 'bg-gradient-to-r from-emerald-200 to-emerald-300 border border-emerald-300'
|
||||
} text-white`}
|
||||
>
|
||||
{teacher.last_name} {teacher.first_name}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user