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",
component: () => import("@/pages/AppointmentsPage.vue"),
},
{
path: "/course/:courseSlug/appointments",
component: () => import("@/pages/AppointmentsPage.vue"),
},
{
path: "/styleguide",
component: () => import("../pages/StyleGuidePage.vue"),

View File

@ -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,
};
}