+
{{ activeEvent?.name || 'Event' }}
-
+
Date: Fri, 5 Dec 2025 16:28:42 -0500
Subject: [PATCH 7/8] Added support for public read only calendar #53
---
ui/src/components/Navigation/Navbar.vue | 6 ++++++
ui/src/components/calendar/ViewCalendarEvent.vue | 16 +++-------------
ui/src/pages/Calendar.vue | 16 +++++++++-------
ui/src/router/index.js | 4 ++--
4 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/ui/src/components/Navigation/Navbar.vue b/ui/src/components/Navigation/Navbar.vue
index 72c5bd4..c56d592 100644
--- a/ui/src/components/Navigation/Navbar.vue
+++ b/ui/src/components/Navigation/Navbar.vue
@@ -156,6 +156,12 @@ function blurAfter() {
Join
+
+
+
+ Calendar
+
+
diff --git a/ui/src/components/calendar/ViewCalendarEvent.vue b/ui/src/components/calendar/ViewCalendarEvent.vue
index 34fe5f9..c24ca14 100644
--- a/ui/src/components/calendar/ViewCalendarEvent.vue
+++ b/ui/src/components/calendar/ViewCalendarEvent.vue
@@ -14,22 +14,10 @@ import DropdownMenuItem from '../ui/dropdown-menu/DropdownMenuItem.vue';
import { Calendar } from 'lucide-vue-next';
const route = useRoute();
-// const eventID = computed(() => {
-// const id = route.params.id;
-// if (typeof id === 'string') return id;
-// return undefined;
-// });
const loaded = ref
(false);
const activeEvent = ref(null);
-// onMounted(async () => {
-// let eventID = route.params.id;
-// console.log(eventID);
-// activeEvent.value = await getCalendarEvent(Number(eventID));
-// loaded.value = true;
-// });
-
watch(
() => route.params.id,
async (id) => {
@@ -76,6 +64,7 @@ const viewedState = ref(CalendarAttendance.Attending);
let user = useUserStore();
const myAttendance = computed(() => {
+ if (!user.isLoggedIn) return null;
return activeEvent.value.eventSignups.find(
(s) => s.member_id === user.user.id
) || null;
@@ -88,6 +77,7 @@ async function setAttendance(state: CalendarAttendance) {
}
const canEditEvent = computed(() => {
+ if (!user.isLoggedIn) return false;
if (user.user.id == activeEvent.value.creator_id)
return true;
});
@@ -223,7 +213,7 @@ defineExpose({ forceReload })
This event has been cancelled
-
+
(null)
@@ -48,6 +48,7 @@ const dialogRef = ref(null)
// NEW: handle day/time slot clicks to start creating an event
function onDateClick(arg: { dateStr: string }) {
+ if (!userStore.isLoggedIn) return;
dialogRef.value?.openDialog(arg.dateStr);
// For now, just open the panel with a draft payload.
// activeEvent.value = {
@@ -202,7 +203,7 @@ onMounted(() => {
@click="goToday">
Today
-
@@ -216,7 +217,8 @@ onMounted(() => {
- { router.push('/calendar'); }" @reload="loadEvents()" @edit="(val) => {dialogRef.openDialog(null, 'edit', val)}">
+ { router.push('/calendar'); }"
+ @reload="loadEvents()" @edit="(val) => { dialogRef.openDialog(null, 'edit', val) }">
diff --git a/ui/src/router/index.js b/ui/src/router/index.js
index 29cc862..74e99a4 100644
--- a/ui/src/router/index.js
+++ b/ui/src/router/index.js
@@ -16,8 +16,8 @@ const router = createRouter({
{ path: '/loa', component: () => import('@/pages/SubmitLOA.vue'), meta: { requiresAuth: true, memberOnly: true } },
{ path: '/transfer', component: () => import('@/pages/Transfer.vue'), meta: { requiresAuth: true, memberOnly: true } },
- { path: '/calendar', component: () => import('@/pages/Calendar.vue'), meta: { requiresAuth: true, memberOnly: true }, },
- { path: '/calendar/event/:id', component: () => import('@/pages/Calendar.vue'), meta: { requiresAuth: true, memberOnly: true }, },
+ { path: '/calendar', component: () => import('@/pages/Calendar.vue'), meta: { }, },
+ { path: '/calendar/event/:id', component: () => import('@/pages/Calendar.vue'), meta: { }, },
{ path: '/trainingReport', component: () => import('@/pages/TrainingReport.vue'), meta: { requiresAuth: true, memberOnly: true } },
{ path: '/trainingReport/new', component: () => import('@/pages/TrainingReport.vue'), meta: { requiresAuth: true, memberOnly: true } },
--
2.37.3.windows.1
From a233b15ad46c7909795b63c7161761280f89ecd9 Mon Sep 17 00:00:00 2001
From: ajdj100
Date: Fri, 5 Dec 2025 16:34:00 -0500
Subject: [PATCH 8/8] Switched clock icon to something more readable at that
size
---
ui/src/components/calendar/ViewCalendarEvent.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/src/components/calendar/ViewCalendarEvent.vue b/ui/src/components/calendar/ViewCalendarEvent.vue
index c24ca14..c99e0dc 100644
--- a/ui/src/components/calendar/ViewCalendarEvent.vue
+++ b/ui/src/components/calendar/ViewCalendarEvent.vue
@@ -1,7 +1,7 @@