Display Mentees page for experts/supervisors
This commit is contained in:
parent
c2a3e5c80e
commit
8c41d4ab03
|
|
@ -2,9 +2,10 @@
|
|||
import { useLearningMentees } from "@/services/learningMentees";
|
||||
import { useCurrentCourseSession } from "@/composables";
|
||||
import { useCSRFFetch } from "@/fetchHelpers";
|
||||
import { computed } from "vue";
|
||||
|
||||
const courseSession = useCurrentCourseSession();
|
||||
const { summary, fetchData } = useLearningMentees(courseSession.value.id);
|
||||
const { isLoading, summary, fetchData } = useLearningMentees(courseSession.value.id);
|
||||
|
||||
const removeMyMentee = async (menteeId: string) => {
|
||||
await useCSRFFetch(
|
||||
|
|
@ -12,6 +13,12 @@ const removeMyMentee = async (menteeId: string) => {
|
|||
).delete();
|
||||
fetchData();
|
||||
};
|
||||
|
||||
const noMenteesText = computed(() =>
|
||||
courseSession.value.course.configuration.is_uk
|
||||
? "a.Aktuell begleitest du niemanden als Praxisbildner."
|
||||
: "a.Aktuell begleitest du niemanden als Lernbegleitung."
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -66,12 +73,12 @@ const removeMyMentee = async (menteeId: string) => {
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div v-else>
|
||||
</div>
|
||||
<div v-if="!isLoading && !summary">
|
||||
<h2 class="heading-2 py-6">{{ $t("a.Personen, die du begleitest") }}</h2>
|
||||
<div class="flex items-center bg-white px-4 py-2">
|
||||
<it-icon-info class="it-icon mr-2 h-6 w-6" />
|
||||
{{ $t("a.Aktuell begleitest du niemanden als Lernbegleitung.") }}
|
||||
</div>
|
||||
{{ $t(noMenteesText) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -10,8 +10,11 @@ const isMyMentorsVisible = computed(() =>
|
|||
courseSession.value.actions.includes("learning-mentor::edit-mentors")
|
||||
);
|
||||
|
||||
const isMyMenteesVisible = computed(() =>
|
||||
courseSession.value.actions.includes("learning-mentor::guide-members")
|
||||
const isMyMenteesVisible = computed(
|
||||
() =>
|
||||
courseSession.value.actions.includes("learning-mentor::guide-members") ||
|
||||
courseSession.value.actions.includes("is_expert") ||
|
||||
courseSession.value.actions.includes("is_supervisor")
|
||||
);
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export type DashboardPersonRoleType =
|
|||
|
||||
export type DashboardRoleKeyType =
|
||||
| "Supervisor"
|
||||
| "Expert"
|
||||
| "Trainer"
|
||||
| "Member"
|
||||
| "MentorUK"
|
||||
| "MentorVV";
|
||||
|
|
|
|||
Loading…
Reference in New Issue