} // Type assertion to make TypeScript happy
-
className={`${staff.color} border border-white shadow-md text-white rounded p-1 text-xs h-full overflow-hidden cursor-move relative ${
isDragging ? 'opacity-50' : 'opacity-100'
}`}
@@ -483,14 +506,14 @@ export default function AppointmentsPage() {
onClick={(e) => {
// Only allow edit on click if we're not dragging
if (!isDragging) {
- const fullAppointment = appointments.find((a:any) => a.id === appointment.id);
+ const fullAppointment = appointments.find(a => a.id === appointment.id);
if (fullAppointment) {
e.stopPropagation();
handleEditAppointment(fullAppointment);
}
}
}}
- onContextMenu={(e) => handleContextMenu(e, appointment.id)}
+ onContextMenu={(e) => handleContextMenu(e, appointment.id ?? 0)}
>
@@ -531,8 +554,6 @@ export default function AppointmentsPage() {
return (
}
-
-
key={`${timeSlot.time}-${staffId}`}
className={`px-1 py-1 border relative h-14 ${isOver && canDrop ? 'bg-green-100' : ''}`}
>
@@ -583,7 +604,7 @@ export default function AppointmentsPage() {
|