diff --git a/ui/src/components/calendar/ViewCalendarEvent.vue b/ui/src/components/calendar/ViewCalendarEvent.vue index 1c9624c..4d6509f 100644 --- a/ui/src/components/calendar/ViewCalendarEvent.vue +++ b/ui/src/components/calendar/ViewCalendarEvent.vue @@ -26,13 +26,13 @@ const activeEvent = ref(null); // }); watch( - () => route.params.id, - async (id) => { - if (!id) return; - activeEvent.value = await getCalendarEvent(Number(id)); - loaded.value = true; - }, - { immediate: true } + () => route.params.id, + async (id) => { + if (!id) return; + activeEvent.value = await getCalendarEvent(Number(id)); + loaded.value = true; + }, + { immediate: true } ); const emit = defineEmits<{ @@ -71,7 +71,7 @@ const myAttendance = computed(() => { }); async function setAttendance(state: CalendarAttendance) { - setCalendarEventAttendance(activeEvent.value.id, state); + await setCalendarEventAttendance(activeEvent.value.id, state); //refresh event data activeEvent.value = await getCalendarEvent(activeEvent.value.id); } @@ -98,10 +98,10 @@ async function setAttendance(state: CalendarAttendance) { :class="myAttendance?.status === CalendarAttendance.Attending ? 'border-2 border-primary text-primary' : ''" @click="setAttendance(CalendarAttendance.Attending)">Going @@ -121,7 +121,7 @@ async function setAttendance(state: CalendarAttendance) { Created by: {{ activeEvent.creator_name || "Unknown User" - }} + }}