Merged in feature/VBV-460-user-profile-circle-read-only (pull request #162)

Bugfix VBV-460: show read-only circle view in cockpit

Approved-by: Elia Bieri
This commit is contained in:
Daniel Egger 2023-07-21 06:41:57 +00:00
commit 4d9aa07b2d
3 changed files with 9 additions and 1 deletions

View File

@ -65,6 +65,7 @@ function setActiveClasses(isActive: boolean) {
:use-mobile-layout="false"
:hide-buttons="true"
:learning-path="learningPath"
:override-circle-url-base="`/course/${props.courseSlug}/cockpit/profile/${props.userId}`"
></LearningPathPathView>
</div>
<ul class="mb-5 flex flex-row border-b-2">

View File

@ -14,6 +14,7 @@ const props = defineProps<{
isFirstCircle: boolean;
isLastCircle: boolean;
isCurrentCircle: boolean;
overrideCircleUrl?: string;
}>();
const circleElement = ref<HTMLElement | null>(null);
@ -33,7 +34,7 @@ onMounted(() => {
<template>
<router-link
:to="props.circle.frontend_url"
:to="overrideCircleUrl ? overrideCircleUrl : props.circle.frontend_url"
:data-cy="`circle-${props.circle.title}`"
class="flex flex-col items-center pb-6"
>

View File

@ -10,6 +10,7 @@ const props = defineProps<{
learningPath: LearningPath | undefined;
useMobileLayout: boolean;
hideButtons?: boolean;
overrideCircleUrlBase?: string;
}>();
const scrollIncrement = 600;
@ -72,6 +73,11 @@ const scrollLearnPathDiagram = (offset: number) => {
isLastCircle(topicIndex, circleIndex, topic.circles.length)
"
:is-current-circle="isCurrentCircle(circle) && !props.hideButtons"
:override-circle-url="
props.overrideCircleUrlBase
? `${props.overrideCircleUrlBase}/${circle.slug}`
: undefined
"
></LearningPathCircleColumn>
</div>
</div>