fix: participant-less mentor edge case



This commit is contained in:
Livio Bieri 2024-03-18 15:21:11 +01:00
parent 72bc985bf1
commit e33bf185c1
2 changed files with 40 additions and 37 deletions

View File

@ -8,6 +8,7 @@ const { summary } = useLearningMentees(courseSession.value.id);
<template>
<div v-if="summary">
<template v-if="summary.participants.length > 0">
<h2 class="heading-2 py-6">{{ $t("a.Personen, die du begleitest") }}</h2>
<div class="bg-white px-4 py-2">
<div
@ -19,7 +20,9 @@ const { summary } = useLearningMentees(courseSession.value.id);
<img
:alt="participant.last_name"
class="h-11 w-11 rounded-full"
:src="participant.avatar_url || '/static/avatars/myvbv-default-avatar.png'"
:src="
participant.avatar_url || '/static/avatars/myvbv-default-avatar.png'
"
/>
<div>
<div class="text-bold">
@ -40,5 +43,13 @@ const { summary } = useLearningMentees(courseSession.value.id);
</router-link>
</div>
</div>
</template>
<div v-else>
<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>
</div>
</div>
</template>

View File

@ -25,13 +25,5 @@ const isMyMenteesVisible = computed(() =>
<MyMentees />
</div>
</template>
<!-- edge case for pure mentor (= no course session user) and all mentees are removed -->
<div v-else>
<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>
</div>
</div>
</template>