WIP: Update Lernbegleitung copy [skip ci]
This commit is contained in:
parent
58cf852842
commit
a375559670
|
|
@ -1,4 +1,3 @@
|
|||
2
|
||||
<script setup lang="ts">
|
||||
import AssignmentSubmissionProgress from "@/components/assignment/AssignmentSubmissionProgress.vue";
|
||||
import type {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import {
|
|||
getLearningPathUrl,
|
||||
getMediaCenterUrl,
|
||||
} from "@/utils/utils";
|
||||
import { useMentorTexts } from "@/composables";
|
||||
|
||||
log.debug("MainNavigationBar created");
|
||||
|
||||
|
|
@ -121,6 +122,8 @@ const hasLearningMentor = computed(() => {
|
|||
const courseSession = courseSessionsStore.currentCourseSession;
|
||||
return courseSession.actions.includes("learning-mentor");
|
||||
});
|
||||
|
||||
const mentorTabTitle = useMentorTexts().mentorTabTitle;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -265,7 +268,7 @@ const hasLearningMentor = computed(() => {
|
|||
class="nav-item"
|
||||
:class="{ 'nav-item--active': inLearningMentor() }"
|
||||
>
|
||||
{{ t("a.Lernbegleitung") }}
|
||||
{{ t(mentorTabTitle) }}
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
getLearningPathUrl,
|
||||
getMediaCenterUrl,
|
||||
} from "@/utils/utils";
|
||||
import { useMentorTexts } from "@/composables";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
|
|
@ -36,6 +37,8 @@ const clickLink = (to: string | undefined) => {
|
|||
emit("closemodal");
|
||||
}
|
||||
};
|
||||
|
||||
const mentorTabTitle = useMentorTexts().mentorTabTitle;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -97,7 +100,7 @@ const clickLink = (to: string | undefined) => {
|
|||
data-cy="navigation-mobile-mentor-link"
|
||||
@click="clickLink(getLearningMentorUrl(courseSession.course.slug))"
|
||||
>
|
||||
{{ $t("a.Lernbegleitung") }}
|
||||
{{ $t(mentorTabTitle) }}
|
||||
</button>
|
||||
</li>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { useCurrentCourseSession } from "@/composables";
|
||||
import { useCurrentCourseSession, useMentorTexts } from "@/composables";
|
||||
import ItModal from "@/components/ui/ItModal.vue";
|
||||
import { computed, ref } from "vue";
|
||||
import { useCSRFFetch } from "@/fetchHelpers";
|
||||
|
|
@ -68,19 +68,21 @@ const inviteMentor = async () => {
|
|||
showInvitationModal.value = false;
|
||||
inviteeEmail.value = "";
|
||||
};
|
||||
|
||||
const { myLearningMentors, inviteLearningMentor, noLearningMentors } = useMentorTexts();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="!isLoading" class="bg-gray-200">
|
||||
<div class="flex flex-row items-center justify-between py-6">
|
||||
<h2 class="heading-2">{{ $t("a.Meine Lernbegleitung") }}</h2>
|
||||
<h2 class="heading-2">{{ $t(myLearningMentors) }}</h2>
|
||||
<div>
|
||||
<button
|
||||
class="btn-secondary flex items-center"
|
||||
@click="showInvitationModal = true"
|
||||
>
|
||||
<it-icon-add class="it-icon mr-2 h-6 w-6" />
|
||||
{{ $t("a.Neue Lernbegleitung einladen") }}
|
||||
{{ $t(inviteLearningMentor) }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -143,16 +145,14 @@ const inviteMentor = async () => {
|
|||
<div class="j mx-1 my-3 flex w-fit items-center space-x-1 bg-sky-200 p-4">
|
||||
<it-icon-info class="it-icon mr-2 h-6 w-6 text-sky-700" />
|
||||
<span>
|
||||
{{
|
||||
$t("a.Aktuell hast du noch keine Person als Lernbegleitung eingeladen.")
|
||||
}}
|
||||
{{ $t(noLearningMentors) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<ItModal v-model="showInvitationModal">
|
||||
<template #title>{{ $t("a.Neue Lernbegleitung einladen") }}</template>
|
||||
<template #title>{{ $t(inviteLearningMentor) }}</template>
|
||||
<template #body>
|
||||
<div class="flex flex-col">
|
||||
<label for="mentor-email">{{ $t("a.E-Mail Adresse") }}</label>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { useCurrentCourseSession } from "@/composables";
|
||||
import { useCurrentCourseSession, useMentorTexts } from "@/composables";
|
||||
|
||||
const currentCourseSession = useCurrentCourseSession();
|
||||
const { actionNoLearningMentors, inviteLearningMentorShort } = useMentorTexts();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -9,11 +10,7 @@ const currentCourseSession = useCurrentCourseSession();
|
|||
<it-icon-info class="it-icon h-6 w-6 text-sky-700" />
|
||||
<div>
|
||||
<div class="mb-4">
|
||||
{{
|
||||
$t(
|
||||
"a.Aktuell hast du noch keine Person als Lernbegleitung eingeladen. Lade jetzt jemanden ein."
|
||||
)
|
||||
}}
|
||||
{{ $t(actionNoLearningMentors) }}
|
||||
</div>
|
||||
<router-link
|
||||
:to="{
|
||||
|
|
@ -22,7 +19,7 @@ const currentCourseSession = useCurrentCourseSession();
|
|||
}"
|
||||
class="btn-blue px-4 py-2 font-bold"
|
||||
>
|
||||
{{ $t("a.Lernbegleitung einladen") }}
|
||||
{{ $t(inviteLearningMentorShort) }}
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -510,3 +510,45 @@ export function useDashboardPersons() {
|
|||
loading,
|
||||
};
|
||||
}
|
||||
|
||||
export function useMentorTexts() {
|
||||
const texts = computed(() => {
|
||||
try {
|
||||
const is_uk =
|
||||
useCourseSessionsStore().currentCourseSession?.course.configuration.is_uk;
|
||||
const mentorTabTitle = is_uk ? "Praxisbildner" : "a.Lernbegleitung";
|
||||
const myLearningMentors = is_uk ? "Meine Praxisbildner" : "Meine Lernbegleiter";
|
||||
const inviteLearningMentor = is_uk
|
||||
? "Neuen Praxisbildner einladen"
|
||||
: "a.Neue Lernbegleitung einladen";
|
||||
const inviteLearningMentorShort = is_uk
|
||||
? "Praxisbildner einladen"
|
||||
: "Lernbegleitung einladen";
|
||||
const noLearningMentors = is_uk
|
||||
? "a.Aktuell hast du noch keine Person als Praxisbildner eingeladen."
|
||||
: "a.Aktuell hast du noch keine Person als Lernbegleitung eingeladen.";
|
||||
const actionNoLearningMentors = is_uk
|
||||
? "a.Aktuell hast du noch keine Person als Praxisbildner eingeladen. Lade jetzt jemanden ein."
|
||||
: "a.Aktuell hast du noch keine Person als Lernbegleitung eingeladen. Lade jetzt jemanden ein.";
|
||||
return {
|
||||
mentorTabTitle,
|
||||
myLearningMentors,
|
||||
inviteLearningMentor,
|
||||
inviteLearningMentorShort,
|
||||
noLearningMentors,
|
||||
actionNoLearningMentors,
|
||||
};
|
||||
} catch (e) {
|
||||
return {
|
||||
mentorTabTitle: "",
|
||||
myLearningMentors: "",
|
||||
inviteLearningMentor: "",
|
||||
inviteLearningMentorShort: "",
|
||||
noLearningMentors: "",
|
||||
actionNoLearningMentors: "",
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
return { ...texts.value };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@ export interface CourseConfiguration {
|
|||
enable_circle_documents: boolean;
|
||||
enable_learning_mentor: boolean;
|
||||
enable_competence_certificates: boolean;
|
||||
is_uk: boolean;
|
||||
}
|
||||
|
||||
export interface Course {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class CourseConfigurationSerializer(serializers.ModelSerializer):
|
|||
"enable_circle_documents",
|
||||
"enable_learning_mentor",
|
||||
"enable_competence_certificates",
|
||||
"is_uk",
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue