chore: course appointment route

This commit is contained in:
Livio Bieri 2023-10-02 09:21:08 +02:00
parent 540f8c7eb7
commit 4068a3d365
2 changed files with 7 additions and 3 deletions

View File

@ -187,6 +187,10 @@ const router = createRouter({
path: "/appointments", path: "/appointments",
component: () => import("@/pages/AppointmentsPage.vue"), component: () => import("@/pages/AppointmentsPage.vue"),
}, },
{
path: "/course/:courseSlug/appointments",
component: () => import("@/pages/AppointmentsPage.vue"),
},
{ {
path: "/styleguide", path: "/styleguide",
component: () => import("../pages/StyleGuidePage.vue"), component: () => import("../pages/StyleGuidePage.vue"),

View File

@ -27,8 +27,8 @@ export function useRouteLookups() {
return regex.test(route.path); return regex.test(route.path);
} }
function inDueDates() { function inAppointments() {
const regex = new RegExp("/[^/]+/duedates"); const regex = new RegExp("/(?:[^/]+/)?appointments");
return regex.test(route.path); return regex.test(route.path);
} }
@ -38,6 +38,6 @@ export function useRouteLookups() {
inLearningPath, inLearningPath,
inCompetenceProfile, inCompetenceProfile,
inCourse, inCourse,
inDueDates, inAppointments: inAppointments,
}; };
} }