fix: hide kompetenznachweise for VV

This commit is contained in:
Reto Aebersold 2023-12-21 10:24:32 +01:00
parent 35250bb93b
commit 04b944711e
1 changed files with 9 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import type {
} from "@/gql/graphql"; } from "@/gql/graphql";
import CompetenceSummaryBox from "@/components/dashboard/CompetenceSummaryBox.vue"; import CompetenceSummaryBox from "@/components/dashboard/CompetenceSummaryBox.vue";
import AssignmentProgressSummaryBox from "@/components/dashboard/AssignmentProgressSummaryBox.vue"; import AssignmentProgressSummaryBox from "@/components/dashboard/AssignmentProgressSummaryBox.vue";
import { VV_COURSE_IDS } from "@/constants";
const dashboardStore = useDashboardStore(); const dashboardStore = useDashboardStore();
@ -46,6 +47,13 @@ const competenceCertificateUrl = computed(() => {
const competenceCriteriaUrl = computed(() => { const competenceCriteriaUrl = computed(() => {
return `/course/${courseSlug.value}/competence/criteria?courseSessionId=${courseSessionProgress.value?.session_to_continue_id}`; return `/course/${courseSlug.value}/competence/criteria?courseSessionId=${courseSessionProgress.value?.session_to_continue_id}`;
}); });
const isVVCourse = computed(() => {
if (!dashboardStore.currentDashboardConfig) {
return false;
}
return VV_COURSE_IDS.includes(dashboardStore.currentDashboardConfig.id);
});
</script> </script>
<template> <template>
@ -74,6 +82,7 @@ const competenceCriteriaUrl = computed(() => {
</div> </div>
<div class="grid auto-rows-fr grid-cols-1 gap-8 xl:grid-cols-2"> <div class="grid auto-rows-fr grid-cols-1 gap-8 xl:grid-cols-2">
<AssignmentProgressSummaryBox <AssignmentProgressSummaryBox
v-if="!isVVCourse"
:total-assignments="assignment.total_count" :total-assignments="assignment.total_count"
:achieved-points-count="assignment.points_achieved_count" :achieved-points-count="assignment.points_achieved_count"
:max-points-count="assignment.points_max_count" :max-points-count="assignment.points_max_count"