From 4068a3d3656cf6feebde534b3a76c58711666e26 Mon Sep 17 00:00:00 2001 From: Livio Bieri Date: Mon, 2 Oct 2023 09:21:08 +0200 Subject: [PATCH] chore: course appointment route --- client/src/router/index.ts | 4 ++++ client/src/utils/route.ts | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/router/index.ts b/client/src/router/index.ts index 80aa4add..5267e651 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -187,6 +187,10 @@ const router = createRouter({ path: "/appointments", component: () => import("@/pages/AppointmentsPage.vue"), }, + { + path: "/course/:courseSlug/appointments", + component: () => import("@/pages/AppointmentsPage.vue"), + }, { path: "/styleguide", component: () => import("../pages/StyleGuidePage.vue"), diff --git a/client/src/utils/route.ts b/client/src/utils/route.ts index 11a566a4..8f2a9b69 100644 --- a/client/src/utils/route.ts +++ b/client/src/utils/route.ts @@ -27,8 +27,8 @@ export function useRouteLookups() { return regex.test(route.path); } - function inDueDates() { - const regex = new RegExp("/[^/]+/duedates"); + function inAppointments() { + const regex = new RegExp("/(?:[^/]+/)?appointments"); return regex.test(route.path); } @@ -38,6 +38,6 @@ export function useRouteLookups() { inLearningPath, inCompetenceProfile, inCourse, - inDueDates, + inAppointments: inAppointments, }; }