calendar 37

This commit is contained in:
Alma 2025-04-13 17:25:32 +02:00
parent 51ab2c2150
commit 5eff93a394

View File

@ -1130,31 +1130,29 @@ export function CalendarClient({ initialCalendars, userId, userProfile }: Calend
}))
)}
eventContent={(arg) => (
<div className="p-1 overflow-hidden">
<div className="font-semibold truncate">{arg.event.title}</div>
{!arg.event.allDay && (
<div className="text-xs opacity-90">
{new Date(arg.event.start).toLocaleTimeString('fr-FR', {
hour: '2-digit',
minute: '2-digit'
})}
{arg.event.end && (
<> - {new Date(arg.event.end).toLocaleTimeString('fr-FR', {
<div className="px-1 py-0.5 overflow-hidden w-full bg-opacity-90 hover:bg-opacity-100 transition-all">
<div className="flex items-center gap-1 text-xs">
{!arg.event.allDay && (
<span className="font-medium whitespace-nowrap">
{new Date(arg.event.start).toLocaleTimeString('fr-FR', {
hour: '2-digit',
minute: '2-digit'
})}</>
)}
</div>
)}
{arg.event.extendedProps.location && (
<div className="text-xs opacity-75 truncate">
<MapPin className="inline-block w-3 h-3 mr-1" />
{arg.event.extendedProps.location}
</div>
)}
})}
</span>
)}
<span className="font-medium truncate">
{arg.event.title}
</span>
</div>
</div>
)}
eventClassNames="rounded-md shadow-sm hover:shadow-md transition-shadow cursor-pointer"
eventClassNames={(arg) => [
'rounded border-l-4',
'hover:ring-2 hover:ring-offset-1 hover:ring-opacity-50',
'transition-all duration-200',
'shadow-sm hover:shadow',
arg.event.allDay ? 'py-1' : ''
]}
locale={frLocale}
selectable={true}
selectMirror={true}