diff --git a/components/calendar/CalendarEventDetails.vue b/components/calendar/CalendarEventDetails.vue index 799f982..eb93c77 100644 --- a/components/calendar/CalendarEventDetails.vue +++ b/components/calendar/CalendarEventDetails.vue @@ -2,19 +2,16 @@ import type { RPGDate } from '@/models/Date' import type { CalendarEvent } from '@/models/CalendarEvent' import { useCalendar } from '@/stores/CalendarStore' -import { useCalendarEvents } from '@/stores/EventStore' import { PhHourglassMedium, PhAlarm, PhHourglassHigh, PhHourglassLow, - PhArrowBendDoubleUpLeft, - PhArrowBendDoubleUpRight + PhDotsThreeOutlineVertical } from '@phosphor-icons/vue' const { defaultDate, getFormattedDateTitle, jumpToDate } = useCalendar() -const { getRelativeEventFromEvent } = useCalendarEvents() const props = defineProps<{ event: CalendarEvent @@ -23,9 +20,10 @@ const props = defineProps<{ isEndEvent?: boolean }>() -const emit = defineEmits<{ - (e: 'query:close-popover'): void -}>() +// Ref for the popover +const eventDetails = ref() + +const emit = defineEmits(['query:close-popover']) const { getRelativeString } = useCalendar() @@ -39,14 +37,15 @@ function handleJumpToDate(date: RPGDate) { emit('query:close-popover') } -function handleGotoRelativeEvent(position: 'next' | 'prev' = 'next') { - try { - const { targetDate } = getRelativeEventFromEvent(props.event, position, props.isEndEvent) +/** + * Edit event + */ +const commandMenuOpened = ref(false) +const editModelOpened = ref(false) - handleJumpToDate(targetDate) - } catch (err) { - console.log(err) - } +function deployEditModal() { + commandMenuOpened.value = false + editModelOpened.value = true } @@ -80,22 +79,24 @@ function handleGotoRelativeEvent(position: 'next' | 'prev' = 'next') { 'border-yellow-600': event.category?.name === 'commerce' }" > -
-
- {{ event.title }} -
+
+
+
+ {{ event.title }} +
-
- - -
+
+ + +
+

@@ -133,7 +134,29 @@ function handleGotoRelativeEvent(position: 'next' | 'prev' = 'next') {

-