From 9802266b8c92e07cc8e3d640114dc0a8c9e578fb Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Mon, 3 Jun 2024 21:39:19 +0200 Subject: [PATCH] Added reactivity when adding an event --- components/calendar/Calendar.vue | 3 +- components/calendar/CalendarEvent.vue | 6 +-- components/calendar/CalendarEventDetails.vue | 11 ++--- components/calendar/form/UpdateEvent.vue | 52 ++++++++++---------- server/api/calendars/events/create.post.ts | 14 +++++- stores/CalendarStore.ts | 26 ++++++++-- stores/EventStore.ts | 40 +++++---------- 7 files changed, 81 insertions(+), 71 deletions(-) diff --git a/components/calendar/Calendar.vue b/components/calendar/Calendar.vue index 5b420d8..b16f81e 100644 --- a/components/calendar/Calendar.vue +++ b/components/calendar/Calendar.vue @@ -7,7 +7,7 @@ import CenturyLayout from './state/centennially/Layout.vue' import DecadeLayout from './state/decennially/Layout.vue' import YearLayout from './state/yearly/Layout.vue' -const { isAdvancedSearchOpen } = storeToRefs(useCalendar()) +const { isAdvancedSearchOpen, isEditEventModalOpen } = storeToRefs(useCalendar()) const route = useRoute() const worldId = route.params.id @@ -110,5 +110,6 @@ onMounted(() => { + diff --git a/components/calendar/CalendarEvent.vue b/components/calendar/CalendarEvent.vue index a6d11da..bf08ba4 100644 --- a/components/calendar/CalendarEvent.vue +++ b/components/calendar/CalendarEvent.vue @@ -17,15 +17,15 @@ const isStartEvent = spansMultipleDays && areDatesIdentical(props.tileDate, prop const isEndEvent = spansMultipleDays && props.event.endDate && areDatesIdentical(props.tileDate, props.event.endDate) -const isPopoverOpen = ref(false) +const isPopoverDetailsOpen = ref(false) function handleClosePopover() { - isPopoverOpen.value = false + isPopoverDetailsOpen.value = false }