Fix texts
This commit is contained in:
parent
c977fcf510
commit
94f61c2ef6
|
|
@ -22,7 +22,6 @@ import {
|
|||
getLearningPathUrl,
|
||||
getMediaCenterUrl,
|
||||
} from "@/utils/utils";
|
||||
import { useMentorTexts } from "@/composables";
|
||||
|
||||
log.debug("MainNavigationBar created");
|
||||
|
||||
|
|
@ -123,7 +122,11 @@ const hasLearningMentor = computed(() => {
|
|||
return courseSession.actions.includes("learning-mentor");
|
||||
});
|
||||
|
||||
const mentorTabTitle = useMentorTexts().mentorTabTitle;
|
||||
const mentorTabTitle = computed(() =>
|
||||
courseSessionsStore.currentCourseSession?.course.configuration.is_uk
|
||||
? "a.Praxisbildner"
|
||||
: "a.Lernbegleitung"
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ import {
|
|||
getLearningPathUrl,
|
||||
getMediaCenterUrl,
|
||||
} from "@/utils/utils";
|
||||
import { useMentorTexts } from "@/composables";
|
||||
import { computed } from "vue";
|
||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
|
|
@ -31,6 +32,8 @@ defineProps<{
|
|||
|
||||
const emit = defineEmits(["closemodal", "logout"]);
|
||||
|
||||
const courseSessionsStore = useCourseSessionsStore();
|
||||
|
||||
const clickLink = (to: string | undefined) => {
|
||||
if (to) {
|
||||
router.push(to);
|
||||
|
|
@ -38,7 +41,11 @@ const clickLink = (to: string | undefined) => {
|
|||
}
|
||||
};
|
||||
|
||||
const mentorTabTitle = useMentorTexts().mentorTabTitle;
|
||||
const mentorTabTitle = computed(() =>
|
||||
courseSessionsStore.currentCourseSession?.course.configuration.is_uk
|
||||
? "a.Praxisbildner"
|
||||
: "a.Lernbegleitung"
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { useCurrentCourseSession, useMentorTexts } from "@/composables";
|
||||
import { useCurrentCourseSession } from "@/composables";
|
||||
import ItModal from "@/components/ui/ItModal.vue";
|
||||
import { computed, ref } from "vue";
|
||||
import { useCSRFFetch } from "@/fetchHelpers";
|
||||
|
|
@ -69,7 +69,23 @@ const inviteMentor = async () => {
|
|||
inviteeEmail.value = "";
|
||||
};
|
||||
|
||||
const { myLearningMentors, inviteLearningMentor, noLearningMentors } = useMentorTexts();
|
||||
const myLearningMentors = computed(() =>
|
||||
courseSession.value.course.configuration.is_uk
|
||||
? "Meine Praxisbildner"
|
||||
: "Meine Lernbegleiter"
|
||||
);
|
||||
|
||||
const inviteLearningMentor = computed(() =>
|
||||
courseSession.value.course.configuration.is_uk
|
||||
? "Neuen Praxisbildner einladen"
|
||||
: "a.Neue Lernbegleitung einladen"
|
||||
);
|
||||
|
||||
const noLearningMentors = computed(() =>
|
||||
courseSession.value.course.configuration.is_uk
|
||||
? "a.Aktuell hast du noch keine Person als Praxisbildner eingeladen."
|
||||
: "a.Aktuell hast du noch keine Person als Lernbegleitung eingeladen."
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
import { useCurrentCourseSession, useMentorTexts } from "@/composables";
|
||||
import { useCurrentCourseSession } from "@/composables";
|
||||
import { computed } from "vue";
|
||||
|
||||
const currentCourseSession = useCurrentCourseSession();
|
||||
const { actionNoLearningMentors, inviteLearningMentorShort } = useMentorTexts();
|
||||
|
||||
const actionNoLearningMentors = computed(() =>
|
||||
currentCourseSession.value.course.configuration.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."
|
||||
);
|
||||
|
||||
const inviteLearningMentorShort = computed(() =>
|
||||
currentCourseSession.value.course.configuration.is_uk
|
||||
? "Neuen Praxisbildner einladen"
|
||||
: "a.Neue Lernbegleitung einladen"
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -630,48 +630,6 @@ export function useDashboardPersonsDueDates(
|
|||
};
|
||||
}
|
||||
|
||||
export function useMentorTexts() {
|
||||
const texts = computed(() => {
|
||||
try {
|
||||
const is_uk =
|
||||
useCourseSessionsStore().currentCourseSession?.course.configuration.is_uk;
|
||||
const mentorTabTitle = is_uk ? "a.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 };
|
||||
}
|
||||
|
||||
export function useCourseCircleProgress(circles: Ref<CircleType[] | undefined>) {
|
||||
const inProgressCirclesCount = computed(() => {
|
||||
if (circles.value?.length) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue