From e01d99d1238e71e47e304aa33426264c56a7600e Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Fri, 3 May 2024 12:14:37 +0200 Subject: [PATCH] Added popover close on start/end select --- src/components/calendar/CalendarEvent.vue | 18 ++++++++-- .../calendar/CalendarEventDetails.vue | 33 ++++++++++++++----- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/src/components/calendar/CalendarEvent.vue b/src/components/calendar/CalendarEvent.vue index c8d445e..9f303c9 100644 --- a/src/components/calendar/CalendarEvent.vue +++ b/src/components/calendar/CalendarEvent.vue @@ -5,6 +5,7 @@ import type { CalendarEvent } from '@/models/Events' import CalendarEventDetails from './CalendarEventDetails.vue' import { areDatesIdentical, type LeimDate } from '@/models/Date' +import { ref } from 'vue' const props = defineProps<{ event: CalendarEvent @@ -16,10 +17,16 @@ const spansMultipleDays = Boolean(props.event.startDate && props.event.endDate) const isStartEvent = spansMultipleDays && areDatesIdentical(props.tileDate, props.event.startDate) const isEndEvent = spansMultipleDays && props.event.endDate && areDatesIdentical(props.tileDate, props.event.endDate) + +const isPopoverOpen = ref(false) + +function handleClosePopover() { + isPopoverOpen.value = false +} diff --git a/src/components/calendar/CalendarEventDetails.vue b/src/components/calendar/CalendarEventDetails.vue index 5f50f4b..9316da0 100644 --- a/src/components/calendar/CalendarEventDetails.vue +++ b/src/components/calendar/CalendarEventDetails.vue @@ -1,5 +1,5 @@ - - Début - - - Fin - +