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