feat: navigation for competence pages
This commit is contained in:
parent
7224aecc02
commit
e32a2eddf3
|
|
@ -69,8 +69,9 @@ const isFeedbackEvaluationVisible = computed(
|
||||||
|
|
||||||
// FIXME 22.02.24: To-be-tackled NEXT in a separate PR (shippable member comp.navi)
|
// 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.
|
// -> Do not use the VV_COURSE_ID anymore (discuss with @chrigu) -> We do this next.
|
||||||
|
const currentCourseSession = useCurrentCourseSession();
|
||||||
const hasCompetenceCertificates = computed(() => {
|
const hasCompetenceCertificates = computed(() => {
|
||||||
return !VV_COURSE_IDS.includes(useCurrentCourseSession().value.course.id);
|
return !VV_COURSE_IDS.includes(currentCourseSession.value.course.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
const isLoaded = computed(
|
const isLoaded = computed(
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import * as log from "loglevel";
|
import * as log from "loglevel";
|
||||||
import { onMounted } from "vue";
|
import { computed, onMounted } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import { VV_COURSE_IDS } from "@/constants";
|
||||||
|
import { useCurrentCourseSession } from "@/composables";
|
||||||
|
|
||||||
log.debug("CompetenceParentPage created");
|
log.debug("CompetenceParentPage created");
|
||||||
|
|
||||||
|
|
@ -27,6 +29,13 @@ function routeInSelfEvaluationAndFeedback() {
|
||||||
return route.path.endsWith("/self-evaluation-and-feedback");
|
return route.path.endsWith("/self-evaluation-and-feedback");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 isVVCourse = computed(() => {
|
||||||
|
return VV_COURSE_IDS.includes(currentCourseSession.value.course.id);
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
log.debug("CompetenceParentPage mounted", props.courseSlug);
|
log.debug("CompetenceParentPage mounted", props.courseSlug);
|
||||||
});
|
});
|
||||||
|
|
@ -45,6 +54,7 @@ onMounted(async () => {
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
|
v-if="!isVVCourse"
|
||||||
class="border-t-2 border-t-transparent lg:ml-12"
|
class="border-t-2 border-t-transparent lg:ml-12"
|
||||||
:class="{ 'border-b-2 border-b-blue-900': routeInCompetenceCertificate() }"
|
:class="{ 'border-b-2 border-b-blue-900': routeInCompetenceCertificate() }"
|
||||||
>
|
>
|
||||||
|
|
@ -77,7 +87,11 @@ onMounted(async () => {
|
||||||
:to="`/course/${courseSlug}/competence/self-evaluation-and-feedback`"
|
:to="`/course/${courseSlug}/competence/self-evaluation-and-feedback`"
|
||||||
class="block py-3"
|
class="block py-3"
|
||||||
>
|
>
|
||||||
{{ $t("a.Selbst- und Fremdeinschätzungen") }}
|
{{
|
||||||
|
isVVCourse
|
||||||
|
? $t("a.Selbst- und Fremdeinschätzungen")
|
||||||
|
: $t("a.Selbsteinschätzungen")
|
||||||
|
}}
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue