chore: mentor management only available for VV courses (#1097)
This commit is contained in:
parent
1979dcd428
commit
712d6d2868
|
|
@ -23,6 +23,7 @@ import {
|
||||||
getMediaCenterUrl,
|
getMediaCenterUrl,
|
||||||
} from "@/utils/utils";
|
} from "@/utils/utils";
|
||||||
import { useCockpitStore } from "@/stores/cockpit";
|
import { useCockpitStore } from "@/stores/cockpit";
|
||||||
|
import { VV_COURSE_IDS } from "@/constants";
|
||||||
|
|
||||||
log.debug("MainNavigationBar created");
|
log.debug("MainNavigationBar created");
|
||||||
|
|
||||||
|
|
@ -95,6 +96,16 @@ const hasAppointmentsMenu = computed(() => {
|
||||||
const hasNotificationsMenu = computed(() => {
|
const hasNotificationsMenu = computed(() => {
|
||||||
return userStore.loggedIn;
|
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);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -223,6 +234,7 @@ const hasNotificationsMenu = computed(() => {
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<router-link
|
<router-link
|
||||||
|
v-if="hasMentorManagementMenu"
|
||||||
data-cy="navigation-learning-mentor-link"
|
data-cy="navigation-learning-mentor-link"
|
||||||
:to="
|
:to="
|
||||||
getLearningMentorManagementUrl(
|
getLearningMentorManagementUrl(
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,9 @@ export const itCheckboxDefaultIconCheckedTailwindClass =
|
||||||
|
|
||||||
export const itCheckboxDefaultIconUncheckedTailwindClass =
|
export const itCheckboxDefaultIconUncheckedTailwindClass =
|
||||||
"bg-[url(/static/icons/icon-checkbox-unchecked.svg)] hover:bg-[url(/static/icons/icon-checkbox-unchecked-hover.svg)]";
|
"bg-[url(/static/icons/icon-checkbox-unchecked.svg)] hover:bg-[url(/static/icons/icon-checkbox-unchecked-hover.svg)]";
|
||||||
|
|
||||||
|
export const VV_COURSE_IDS = [
|
||||||
|
"-4", // vv-de
|
||||||
|
"-10", // vv-fr
|
||||||
|
"-11", // vv-it
|
||||||
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue