diff --git a/client/src/components/header/MainNavigationBar.vue b/client/src/components/header/MainNavigationBar.vue index 1b01194c..ee7658e2 100644 --- a/client/src/components/header/MainNavigationBar.vue +++ b/client/src/components/header/MainNavigationBar.vue @@ -23,7 +23,6 @@ import { getMediaCenterUrl, } from "@/utils/utils"; import { useCockpitStore } from "@/stores/cockpit"; -import { VV_COURSE_IDS } from "@/constants"; log.debug("MainNavigationBar created"); @@ -100,13 +99,13 @@ const hasNotificationsMenu = computed(() => { }); const hasMentorManagementMenu = computed(() => { - if (courseSessionsStore.currentCourseSessionHasCockpit) { + if (courseSessionsStore.currentCourseSessionHasCockpit || !inCourse()) { return false; } - - // learning mentor management is only available for VV courses - const currentCourseId = courseSessionsStore.currentCourseSession?.course.id || ""; - return inCourse() && VV_COURSE_IDS.includes(currentCourseId); + return ( + courseSessionsStore.currentCourseSession?.course.configuration + .enable_learning_mentor ?? false + ); }); diff --git a/client/src/constants.ts b/client/src/constants.ts index 29a76e48..84aaefc3 100644 --- a/client/src/constants.ts +++ b/client/src/constants.ts @@ -3,9 +3,3 @@ export const itCheckboxDefaultIconCheckedTailwindClass = export const itCheckboxDefaultIconUncheckedTailwindClass = "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 -]; diff --git a/client/src/gql/graphql.ts b/client/src/gql/graphql.ts index 5166f554..65be1adc 100644 --- a/client/src/gql/graphql.ts +++ b/client/src/gql/graphql.ts @@ -455,6 +455,7 @@ export type CourseStatisticsType = { export type DashboardConfigType = { __typename?: 'DashboardConfigType'; + course_configuration: CourseConfigurationObjectType; dashboard_type: DashboardType; id: Scalars['ID']['output']; name: Scalars['String']['output']; diff --git a/client/src/gql/schema.graphql b/client/src/gql/schema.graphql index 30f5fd8a..4460c1de 100644 --- a/client/src/gql/schema.graphql +++ b/client/src/gql/schema.graphql @@ -200,6 +200,7 @@ type DashboardConfigType { name: String! slug: String! dashboard_type: DashboardType! + course_configuration: CourseConfigurationObjectType! } enum DashboardType { @@ -208,6 +209,12 @@ enum DashboardType { SIMPLE_DASHBOARD } +type CourseConfigurationObjectType { + enable_circle_documents: Boolean! + enable_learning_mentor: Boolean! + enable_competence_certificates: Boolean! +} + type LearningPathObjectType implements CoursePageInterface { id: ID! title: String! @@ -241,12 +248,6 @@ type CourseObjectType { action_competences: [ActionCompetenceObjectType!]! } -type CourseConfigurationObjectType { - enable_circle_documents: Boolean! - enable_learning_mentor: Boolean! - enable_competence_certificates: Boolean! -} - type ActionCompetenceObjectType implements CoursePageInterface { competence_id: String! id: ID! diff --git a/client/src/pages/competence/CompetenceIndexPage.vue b/client/src/pages/competence/CompetenceIndexPage.vue index 9243279d..8502027b 100644 --- a/client/src/pages/competence/CompetenceIndexPage.vue +++ b/client/src/pages/competence/CompetenceIndexPage.vue @@ -12,7 +12,6 @@ import { } from "@/pages/competence/utils"; import { useSelfEvaluationFeedbackSummaries } from "@/services/selfEvaluationFeedback"; import ItProgress from "@/components/ui/ItProgress.vue"; -import { VV_COURSE_IDS } from "@/constants"; const props = defineProps<{ courseSlug: string; @@ -67,12 +66,7 @@ const isFeedbackEvaluationVisible = computed( false ); -// FIXME 22.02.24: To-be-tackled NEXT in a separate PR (shippable member comp.navi) -// -> Do not use the VV_COURSE_ID anymore (discuss with @chrigu) -> We do this next. const currentCourseSession = useCurrentCourseSession(); -const hasCompetenceCertificates = computed(() => { - return !VV_COURSE_IDS.includes(currentCourseSession.value.course.id); -}); const isLoaded = computed( () => @@ -83,7 +77,10 @@ const isLoaded = computed(