mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-04-06 13:11:25 +00:00
fix: sélection enseignants dans les plannings
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user