fix: sélection enseignants dans les plannings

This commit is contained in:
N3WT DE COMPET
2026-04-05 12:08:04 +02:00
parent 2ef71f99c3
commit 4431c428d3
4 changed files with 109 additions and 15 deletions

View File

@ -54,6 +54,8 @@ const WeekView = ({ onDateClick, onEventClick, events }) => {
return acc;
}, {});
const todayIndex = weekDays.findIndex((day) => isToday(day));
const isWeekend = (date) => {
const day = date.getDay();
return day === 0 || day === 6;
@ -212,6 +214,16 @@ const WeekView = ({ onDateClick, onEventClick, events }) => {
{/* Grille horaire */}
<div ref={scrollContainerRef} className="flex-1 relative">
{isCurrentWeek && todayIndex >= 0 && (
<div
className="absolute top-0 bottom-0 z-[5] border-x border-primary pointer-events-none"
style={{
left: `calc(2.5rem + ((100% - 2.5rem) / 7) * ${todayIndex})`,
width: 'calc((100% - 2.5rem) / 7)',
}}
/>
)}
{/* Ligne de temps actuelle */}
{isCurrentWeek && (
<div
@ -241,7 +253,7 @@ const WeekView = ({ onDateClick, onEventClick, events }) => {
key={`${hour}-${day}`}
className={`h-20 relative border-b border-gray-100
${isWeekend(day) ? 'bg-gray-50' : 'bg-white'}
${isToday(day) ? 'bg-primary/10/50 border-x border-primary' : ''}`}
${isToday(day) ? 'bg-primary/10/50' : ''}`}
onClick={
parentView
? undefined