From 5371ad4fa2a1a46d7f2836e5dc04cb36ca2f804c Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 13 Aug 2025 15:57:34 +0200 Subject: [PATCH] fixes --- components/EventCalendar.vue | 28 +++- components/UpcomingEventBanner.vue | 238 ++++++++++++++++++++-------- server/api/events/[id]/rsvp.post.ts | 43 +++++ server/utils/nocodb-events.ts | 86 ++++++++++ 4 files changed, 321 insertions(+), 74 deletions(-) diff --git a/components/EventCalendar.vue b/components/EventCalendar.vue index 837c8b9..b8c6f86 100644 --- a/components/EventCalendar.vue +++ b/components/EventCalendar.vue @@ -25,14 +25,19 @@ v-model="mobileView" color="primary" variant="outlined" - density="compact" + density="comfortable" mandatory + class="w-100" > - + + mdi-calendar-week + Week + + mdi-calendar-month Month - + mdi-format-list-bulleted Agenda @@ -108,7 +113,7 @@ const { isBoard, isAdmin } = useAuth(); // Reactive state const fullCalendar = ref>(); -const mobileView = ref('month'); +const mobileView = ref('week'); // Default to week view on mobile // Computed properties const calendarHeight = computed(() => { @@ -122,7 +127,12 @@ const currentView = computed(() => { // Mobile responsive view switching if (process.client && window.innerWidth < 960) { - return mobileView.value === 'list' ? 'listWeek' : 'dayGridMonth'; + switch (mobileView.value) { + case 'week': return 'dayGridWeek'; + case 'list': return 'listWeek'; + case 'month': + default: return 'dayGridMonth'; + } } return props.initialView; @@ -375,7 +385,13 @@ function gotoDate(date: string | Date) { // Watch for mobile view changes watch(mobileView, (newView) => { - const viewType = newView === 'list' ? 'listWeek' : 'dayGridMonth'; + let viewType; + switch (newView) { + case 'week': viewType = 'dayGridWeek'; break; + case 'list': viewType = 'listWeek'; break; + case 'month': + default: viewType = 'dayGridMonth'; break; + } changeView(viewType); }); diff --git a/components/UpcomingEventBanner.vue b/components/UpcomingEventBanner.vue index a6c7d9c..ce5acd3 100644 --- a/components/UpcomingEventBanner.vue +++ b/components/UpcomingEventBanner.vue @@ -1,75 +1,155 @@