hid member controls from non member accounts in the calendar

This commit is contained in:
2025-12-17 00:34:21 -05:00
parent 6cb53deee3
commit 2127a48a83
2 changed files with 4 additions and 10 deletions

View File

@@ -80,6 +80,7 @@ async function setAttendance(state: CalendarAttendance) {
const canEditEvent = computed(() => {
if (!userStore.isLoggedIn) return false;
if (userStore.state !== 'member') return false;
if (userStore.user.member.member_id == activeEvent.value.creator_id)
return true;
});
@@ -215,7 +216,7 @@ defineExpose({ forceReload })
<CircleAlert></CircleAlert> This event has been cancelled
</div>
</section>
<section v-if="isPast && userStore.isLoggedIn" class="w-full">
<section v-if="isPast && userStore.state === 'member'" class="w-full">
<ButtonGroup class="flex w-full">
<Button variant="outline"
:class="myAttendance?.status === CalendarAttendance.Attending ? 'border-2 border-primary text-primary' : ''"