diff --git a/ui/src/components/calendar/ViewCalendarEvent.vue b/ui/src/components/calendar/ViewCalendarEvent.vue index 1aab52c..ee47cba 100644 --- a/ui/src/components/calendar/ViewCalendarEvent.vue +++ b/ui/src/components/calendar/ViewCalendarEvent.vue @@ -64,11 +64,11 @@ const maybe = computed(() => { return activeEvent.value.eventS const declined = computed(() => { return activeEvent.value.eventSignups.filter((s) => s.status == CalendarAttendance.NotAttending) }) const viewedState = ref(CalendarAttendance.Attending); -let user = useUserStore(); +let userStore = useUserStore(); const myAttendance = computed(() => { - if (!user.isLoggedIn) return null; + if (!userStore.isLoggedIn) return null; return activeEvent.value.eventSignups.find( - (s) => s.member_id === user.user.id + (s) => s.member_id === userStore.user.member.member_id ) || null; }); @@ -79,8 +79,8 @@ async function setAttendance(state: CalendarAttendance) { } const canEditEvent = computed(() => { - if (!user.isLoggedIn) return false; - if (user.user.id == activeEvent.value.creator_id) + if (!userStore.isLoggedIn) return false; + if (userStore.user.member.member_id == activeEvent.value.creator_id) return true; }); @@ -215,7 +215,7 @@ defineExpose({ forceReload }) This event has been cancelled -
+