From 564d45341c12c441dd79758514df265c8dcf553c Mon Sep 17 00:00:00 2001 From: Elia Bieri Date: Thu, 24 Oct 2024 09:49:00 +0200 Subject: [PATCH] Unify praxisbildner dashboard with berufsbildner --- .gitignore | 3 +++ client/src/components/dashboard/CoursePanel.vue | 8 +++++++- .../src/components/dashboard/MentorCompetenceSummary.vue | 4 +++- client/src/locales/de/translation.json | 1 + client/src/locales/fr/translation.json | 1 + client/src/locales/it/translation.json | 1 + server/vbv_lernwelt/dashboard/views.py | 1 - 7 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6c8c3e4a..1fc12561 100644 --- a/.gitignore +++ b/.gitignore @@ -285,3 +285,6 @@ git-crypt-encrypted-files-check.txt /client/src/gql/dist/minifiedSchema.json /sftptest/ + +# BabelEdit translation software +/client/bable_edit.babel diff --git a/client/src/components/dashboard/CoursePanel.vue b/client/src/components/dashboard/CoursePanel.vue index a02fca17..f1025dc7 100644 --- a/client/src/components/dashboard/CoursePanel.vue +++ b/client/src/components/dashboard/CoursePanel.vue @@ -65,6 +65,13 @@ const actionButtonProps = computed<{ href: string; text: string; cyKey: string } cyKey: "lm-dashboard-link", }; } + if (props.courseConfig?.role_key === "MentorUK") { + return { + href: getLearningPathUrl(props.courseConfig?.course_slug), + text: "a.Teilnehmer Vorschau", + cyKey: "attendance-dashboard-link", + }; + } return { href: getLearningPathUrl(props.courseConfig?.course_slug), text: "Weiter lernen", @@ -75,7 +82,6 @@ const actionButtonProps = computed<{ href: string; text: string; cyKey: string } function hasActionButton(): boolean { return ( - props.courseConfig?.role_key !== "MentorUK" && props.courseConfig?.role_key !== "Ausbildungsverantwortlicher" && props.courseConfig?.role_key !== "Berufsbildner" ); diff --git a/client/src/components/dashboard/MentorCompetenceSummary.vue b/client/src/components/dashboard/MentorCompetenceSummary.vue index d9983090..f689e087 100644 --- a/client/src/components/dashboard/MentorCompetenceSummary.vue +++ b/client/src/components/dashboard/MentorCompetenceSummary.vue @@ -18,6 +18,8 @@ const summary = computed(() => { return mentorAssignmentData.value?.assignments ?? null; }); +const courseSlug = computed(() => mentorAssignmentData.value?.course_slug); + onMounted(async () => { mentorAssignmentData.value = await fetchMentorCompetenceSummary( props.courseId, @@ -29,7 +31,7 @@ onMounted(async () => {