diff --git a/client/src/components/learningPath/DocumentUploadForm.vue b/client/src/components/learningPath/DocumentUploadForm.vue index 966447ea..fdaa9631 100644 --- a/client/src/components/learningPath/DocumentUploadForm.vue +++ b/client/src/components/learningPath/DocumentUploadForm.vue @@ -84,7 +84,7 @@ function showFileInformation() { {{ $t("circlePage.documents.fileLabel") }}
{{ $t("circlePage.documents.modalNameInformation") }}
{{ $t("circlePage.documents.chooseName") }}
diff --git a/client/src/pages/cockpit/CockpitIndexPage.vue b/client/src/pages/cockpit/CockpitIndexPage.vue index b0cbd1a7..39d2514f 100644 --- a/client/src/pages/cockpit/CockpitIndexPage.vue +++ b/client/src/pages/cockpit/CockpitIndexPage.vue @@ -7,7 +7,9 @@ import type { LearningPath } from "@/services/learningPath"; import { useCockpitStore } from "@/stores/cockpit"; import { useCompetenceStore } from "@/stores/competence"; import { useLearningPathStore } from "@/stores/learningPath"; +import { useUserStore } from "@/stores/user"; import log from "loglevel"; +import { computed } from "vue"; const props = defineProps<{ courseSlug: string; @@ -15,6 +17,7 @@ const props = defineProps<{ log.debug("CockpitIndexPage created", props.courseSlug); +const userStore = useUserStore(); const cockpitStore = useCockpitStore(); const competenceStore = useCompetenceStore(); const learningPathStore = useLearningPathStore(); @@ -25,6 +28,33 @@ function userCountStatus(userId: number) { ); } +const circles = computed(() => { + const learningPathCircles = learningPathStore + .learningPathForUser(props.courseSlug, userStore.id) + ?.circles.map((c) => { + return { + id: c.id, + title: c.title, + slug: c.slug, + translation_key: c.translation_key, + }; + }); + + if (cockpitStore.cockpitSessionUser?.circles?.length) { + return cockpitStore.cockpitSessionUser.circles; + } else if (learningPathCircles) { + return learningPathCircles; + } else { + return []; + } +}); + +const selectedCirclesTitles = computed(() => { + return circles.value + .filter((c) => cockpitStore.selectedCircles.includes(c.translation_key)) + .map((c) => c.title); +}); + const data = { transferProgress: { fail: 0, @@ -47,7 +77,7 @@ function setActiveClasses(translationKey: string) {+ {{ expert.first_name }} {{ expert.last_name }} +
+