From 02d637f971ecf3c4accade3505e94abf1783ae3b Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Tue, 9 May 2023 08:08:36 +0200 Subject: [PATCH] Add urls to `ItNavigationProgress` to make them clickable --- .../components/ui/ItNavigationProgress.vue | 25 ++++++++++++++++--- .../assignment/AssignmentView.vue | 2 ++ .../layouts/LearningContentMultiLayout.vue | 4 +++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/client/src/components/ui/ItNavigationProgress.vue b/client/src/components/ui/ItNavigationProgress.vue index 8a6edc01..a47a4512 100644 --- a/client/src/components/ui/ItNavigationProgress.vue +++ b/client/src/components/ui/ItNavigationProgress.vue @@ -8,11 +8,15 @@ export interface Props { currentStep: number; startBadgeText?: string; endBadgeText?: string; + baseUrl?: string; + queryParam?: string; } const props = withDefaults(defineProps(), { startBadgeText: undefined, endBadgeText: undefined, + baseUrl: undefined, + queryParam: "page", }); const hasStartBadge = computed(() => typeof props.startBadgeText !== "undefined"); @@ -55,7 +59,10 @@ const endBadgeClasses = computed(() => { class="inline-flex h-7 items-center justify-center whitespace-nowrap rounded-3xl px-3 text-sm" :class="startBadgeClasses" > - {{ props.startBadgeText }} + + {{ props.startBadgeText }} + + {{ props.startBadgeText }}

{ class="inline-flex h-7 w-7 items-center justify-center rounded-full px-3 py-1 text-sm" :class="getPillClasses(step)" > - {{ step + 1 }} + + {{ step + 1 }} + + {{ step + 1 }}

@@ -75,7 +88,13 @@ const endBadgeClasses = computed(() => { class="inline-flex h-7 items-center justify-center whitespace-nowrap rounded-3xl px-3 text-sm" :class="endBadgeClasses" > - {{ props.endBadgeText }} + + {{ props.endBadgeText }} + + {{ props.endBadgeText }} diff --git a/client/src/pages/learningPath/learningContentPage/assignment/AssignmentView.vue b/client/src/pages/learningPath/learningContentPage/assignment/AssignmentView.vue index 7d8e1c08..27123bb0 100644 --- a/client/src/pages/learningPath/learningContentPage/assignment/AssignmentView.vue +++ b/client/src/pages/learningPath/learningContentPage/assignment/AssignmentView.vue @@ -146,6 +146,8 @@ const assignmentUser = computed(() => { :show-exit-button="showExitButton" :show-start-button="false" :show-previous-button="showPreviousButton" + :base-url="props.learningContent.frontend_url" + query-param="page" start-badge-text="Einleitung" end-badge-text="Abgabe" close-button-variant="close" diff --git a/client/src/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue b/client/src/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue index 87d5ca9d..9c26bf72 100644 --- a/client/src/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue +++ b/client/src/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue @@ -19,6 +19,8 @@ interface Props { startBadgeText?: string; endBadgeText?: string; closeButtonVariant?: ClosingButtonVariant; + baseUrl?: string; + queryParam?: string; } const props = withDefaults(defineProps(), { @@ -55,6 +57,8 @@ const emit = defineEmits(["previous", "next", "exit"]); :start-badge-text="props.startBadgeText" :steps="stepsCount" :end-badge-text="props.endBadgeText" + :base-url="props.baseUrl" + :query-param="props.queryParam" class="overflow-hidden pb-12" >