fix: profile links in cockpit / learning mentor

This commit is contained in:
Livio Bieri 2024-03-13 16:27:34 +01:00
parent 8e076c3dac
commit ff455efe84
5 changed files with 12 additions and 12 deletions

View File

@ -148,7 +148,10 @@ const courseSessionDetailResult = useCourseSessionDetailQuery();
</template>
<template #link>
<router-link
:to="`/course/${props.courseSlug}/profile/${csu.user_id}`"
:to="{
name: 'profileLearningPath',
params: { userId: csu.user_id, courseSlug: props.courseSlug },
}"
class="link w-full lg:text-right"
>
{{ $t("general.profileLink") }}

View File

@ -30,7 +30,10 @@ const { summary } = useLearningMentees(courseSession.value.id);
</div>
</div>
<router-link
:to="{ name: 'userProfile', params: { userId: participant.id } }"
:to="{
name: 'profileLearningPath',
params: { userId: participant.id, courseSlug: courseSession.course.slug },
}"
class="underline"
>
{{ $t("cockpit.profileLink") }}

View File

@ -172,7 +172,10 @@ watch(
<div>
<router-link
class="link"
:to="`/course/${courseSlug}/profile/${profileUser.user_id}`"
:to="{
name: 'profileLearningPath',
params: { userId: profileUser.user_id, courseSlug },
}"
>
{{ $t("general.profileLink") }}
</router-link>

View File

@ -40,14 +40,6 @@ onMounted(() => {
<div v-if="user" class="flex flex-col bg-gray-200">
<div class="relative border-b bg-white shadow-md">
<div class="container-large pb-0">
<router-link
class="btn-text inline-flex items-center pl-0"
:to="`/course/${props.courseSlug}/cockpit`"
>
<it-icon-arrow-left />
<span>{{ $t("general.back") }}</span>
</router-link>
<div class="mb-12 mt-2 flex items-center">
<img class="mr-8 h-48 w-48 rounded-full" :src="user.avatar_url" />
<div class="flex flex-col">

View File

@ -160,7 +160,6 @@ const router = createRouter({
path: "/course/:courseSlug/profile/:userId",
component: () => import("@/pages/userProfile/UserProfilePage.vue"),
props: true,
name: "userProfile",
children: [
{
path: "learning-path",