fix: pagination annuaire

This commit is contained in:
N3WT DE COMPET
2025-05-06 22:57:52 +02:00
parent 9e69790683
commit 980f169c1d
11 changed files with 581 additions and 568 deletions

View File

@ -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">

View File

@ -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>