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:
@@ -438,6 +438,8 @@ export const AgendaView: React.FC<{ onNavigate?: (view: string) => void }> = ({
|
|||||||
}, [agendamentos, dentists, googleEvents]);
|
}, [agendamentos, dentists, googleEvents]);
|
||||||
|
|
||||||
const handleDateClick = (arg: any) => { setReagendarPatient(null); setSelectedAppointment(null); setSelectedDateInfo(arg); setIsModalOpen(true); };
|
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) => {
|
const handleReagendarPendencia = (p: any) => {
|
||||||
setShowPendencias(false);
|
setShowPendencias(false);
|
||||||
@@ -612,6 +614,9 @@ export const AgendaView: React.FC<{ onNavigate?: (view: string) => void }> = ({
|
|||||||
slotMaxTime="19:00:00"
|
slotMaxTime="19:00:00"
|
||||||
allDaySlot={false}
|
allDaySlot={false}
|
||||||
events={events}
|
events={events}
|
||||||
|
selectable={true}
|
||||||
|
selectMirror={true}
|
||||||
|
select={handleDateSelect}
|
||||||
dateClick={handleDateClick}
|
dateClick={handleDateClick}
|
||||||
eventClick={handleEventClick}
|
eventClick={handleEventClick}
|
||||||
height="100%"
|
height="100%"
|
||||||
|
|||||||
Reference in New Issue
Block a user