diff --git a/components/calendar/CalendarEventDetails.vue b/components/calendar/CalendarEventDetails.vue index c1046ca..8d8afa7 100644 --- a/components/calendar/CalendarEventDetails.vue +++ b/components/calendar/CalendarEventDetails.vue @@ -46,6 +46,7 @@ function deployEditModal() { lastActiveEvent.value = { ...props.event } revealEditEventModal() commandMenuOpened.value = false + emit("query:close-popover") } /** @@ -55,6 +56,7 @@ function deployDeleteModal() { lastActiveEvent.value = { ...props.event } revealDeleteEventModal() commandMenuOpened.value = false + emit("query:close-popover") } diff --git a/components/calendar/CalendarMenuToday.vue b/components/calendar/CalendarMenuToday.vue index 13bf872..5860fc4 100644 --- a/components/calendar/CalendarMenuToday.vue +++ b/components/calendar/CalendarMenuToday.vue @@ -14,7 +14,7 @@ const buttonDisabledState: ComputedRef = computed(() => { - + {{ $t('entity.calendar.date.today') }} diff --git a/components/calendar/dialog/CreateEvent.vue b/components/calendar/dialog/CreateEvent.vue index 185b8e9..e3619eb 100644 --- a/components/calendar/dialog/CreateEvent.vue +++ b/components/calendar/dialog/CreateEvent.vue @@ -39,6 +39,7 @@ function openEventCreatePopover() { */ function handleClosing(e: Event) { if (isLoading.value) { + popoverOpen.value = false e.preventDefault() } } @@ -61,7 +62,7 @@ function handleClosing(e: Event) { @interact-outside="handleClosing" @pointer-down-outside="handleClosing" > - + diff --git a/components/calendar/form/CreateEvent.vue b/components/calendar/form/CreateEvent.vue index 145a613..bc2396e 100644 --- a/components/calendar/form/CreateEvent.vue +++ b/components/calendar/form/CreateEvent.vue @@ -2,9 +2,10 @@ import type { RPGDate } from "~/models/Date"; import { PhAlarm, PhCircleNotch, PhEye, PhEyeClosed, PhMapPinArea, PhTag } from "@phosphor-icons/vue" +const emit = defineEmits(["event-created"]) + const { eventSkeleton } = storeToRefs(useCalendar()) const { submitSkeleton, cancelLatestRequest } = useCalendar() -const popoverOpen = ref(false) const { t } = useI18n() @@ -28,7 +29,7 @@ async function handleSubmit() { try { await submitSkeleton() - popoverOpen.value = false + emit("event-created") } catch (err) { if (err instanceof Error) { formErrors.message = err.message @@ -64,7 +65,6 @@ function handleCancel() { pattern="([A-Za-zÀ-ÖØ-öø-ÿ0-9\s\&\-\~]+){3,120}" class="w-full -my-1 py-1 -mx-1 px-1 text-lg border-b-[1px] bg-transparent focus-visible:outline-none focus-visible:border-blue-600 invalid:border-red-500" > -
{{ t('entity.calendar.event.patterns.title') }}