From 712d6d2868f5479e973e7e543fab05432af17ed8 Mon Sep 17 00:00:00 2001 From: Livio Bieri Date: Thu, 14 Dec 2023 10:33:54 +0100 Subject: [PATCH] chore: mentor management only available for VV courses (#1097) --- client/src/components/header/MainNavigationBar.vue | 12 ++++++++++++ client/src/constants.ts | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/client/src/components/header/MainNavigationBar.vue b/client/src/components/header/MainNavigationBar.vue index ab87a236..b847b2a0 100644 --- a/client/src/components/header/MainNavigationBar.vue +++ b/client/src/components/header/MainNavigationBar.vue @@ -23,6 +23,7 @@ import { getMediaCenterUrl, } from "@/utils/utils"; import { useCockpitStore } from "@/stores/cockpit"; +import { VV_COURSE_IDS } from "@/constants"; log.debug("MainNavigationBar created"); @@ -95,6 +96,16 @@ const hasAppointmentsMenu = computed(() => { const hasNotificationsMenu = computed(() => { return userStore.loggedIn; }); + +const hasMentorManagementMenu = computed(() => { + if (courseSessionsStore.currentCourseSessionHasCockpit) { + return false; + } + + // learning mentor management is only available for VV courses + const currentCourseId = courseSessionsStore.currentCourseSession?.course.id || ""; + return inCourse() && VV_COURSE_IDS.includes(currentCourseId); +});