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

@@ -49,15 +49,8 @@ const dialogRef = ref<any>(null)
// NEW: handle day/time slot clicks to start creating an event
function onDateClick(arg: { dateStr: string }) {
if (!userStore.isLoggedIn) return;
if (userStore.state !== 'member') return;
dialogRef.value?.openDialog(arg.dateStr);
// For now, just open the panel with a draft payload.
// activeEvent.value = {
// id: '__draft__',
// title: 'New event',
// start: arg.dateStr,
// extendedProps: { draft: true }
// }
// panelOpen.value = true
}
const calendarOptions = ref({
@@ -203,7 +196,7 @@ onMounted(() => {
@click="goToday">
Today
</button>
<button v-if="userStore.isLoggedIn"
<button v-if="userStore.isLoggedIn && userStore.state === 'member'"
class="cursor-pointer ml-1 inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground hover:opacity-90"
@click="onCreateEvent">
<Plus class="h-4 w-4" />