Fixed updating modal not closing as well

This commit is contained in:
Alexis
2024-12-19 16:16:45 +01:00
parent 01fe9f3281
commit dde3f8504a
2 changed files with 7 additions and 7 deletions

View File

@@ -3,6 +3,8 @@ import { PhAlarm, PhCircleNotch, PhEye, PhEyeClosed, PhMapPinArea, PhPencilSimpl
import { useToast } from "~/components/ui/toast";
import type { APIError } from "~/models/Errors";
const emit = defineEmits(["event-updated"])
const { resetSkeleton, updateEventFromSkeleton, cancelLatestRequest } = useCalendar()
const { eventSkeleton, lastActiveEvent } = storeToRefs(useCalendar())
@@ -22,6 +24,8 @@ async function handleAction() {
try {
await updateEventFromSkeleton()
emit("event-updated")
} catch (err) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const apiError = (err as any).data as APIError