fix(agenda): habilita selectable/select para abrir modal de novo agendamento no slot

- selectable + selectMirror + select (clicar/arrastar intervalo livre abre o modal)
- complementa dateClick; útil com a agenda cheia de eventos do Google

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
VPS 4 Builder
2026-06-09 17:49:18 +02:00
parent eed0f615c8
commit b97c5a07b7
+5
View File
@@ -438,6 +438,8 @@ export const AgendaView: React.FC<{ onNavigate?: (view: string) => void }> = ({
}, [agendamentos, dentists, googleEvents]);
const handleDateClick = (arg: any) => { setReagendarPatient(null); setSelectedAppointment(null); setSelectedDateInfo(arg); setIsModalOpen(true); };
// Selecionar (clicar/arrastar) um intervalo livre também abre o modal de novo agendamento.
const handleDateSelect = (info: any) => { setReagendarPatient(null); setSelectedAppointment(null); setSelectedDateInfo({ dateStr: info.startStr }); setIsModalOpen(true); };
const handleReagendarPendencia = (p: any) => {
setShowPendencias(false);
@@ -612,6 +614,9 @@ export const AgendaView: React.FC<{ onNavigate?: (view: string) => void }> = ({
slotMaxTime="19:00:00"
allDaySlot={false}
events={events}
selectable={true}
selectMirror={true}
select={handleDateSelect}
dateClick={handleDateClick}
eventClick={handleEventClick}
height="100%"