Merged in feature/VBV-743-lernbegleitung-lehrgang-kaufen-in-footer (pull request #387)

VBV-734: Für Lernbegleitung - “Lehrgang kaufen” in Footer bewegen

* Move “Lehrgang kaufen” to footer


Approved-by: Daniel Egger
This commit is contained in:
Elia Bieri 2024-09-23 07:31:53 +00:00 committed by Daniel Egger
parent 6b61f448f0
commit 5ecce4232a
2 changed files with 13 additions and 11 deletions

View File

@ -1,13 +1,18 @@
<script setup lang="ts">
import { useVVByLink } from "@/composables";
import { SUPPORT_LOCALES } from "@/i18nextWrapper";
import { useCourseSessionsStore } from "@/stores/courseSessions";
import type { AvailableLanguages } from "@/stores/user";
import { useUserStore } from "@/stores/user";
import { isVVLearningMentor } from "@/utils/utils";
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue";
import * as log from "loglevel";
log.debug("AppFooter created");
const userStore = useUserStore();
const courseSessionsStore = useCourseSessionsStore();
const vvBuyLink = useVVByLink();
const hideVersion = (import.meta.env.VITE_APP_ENVIRONMENT || "local").startsWith(
"prod"
);
@ -30,6 +35,14 @@ async function changeLocale(language: AvailableLanguages) {
{{ $t("footer.imprintText") }}
</a>
</div>
<router-link
class="lg:ml-8"
v-if="isVVLearningMentor(courseSessionsStore.currentCourseSession)"
:to="vvBuyLink.href.value"
data-cy="buy-vv-link"
>
{{ $t("a.Lehrgang kaufen") }}
</router-link>
<div class="flex-grow"></div>
<div :class="{ hidden: hideVersion }">VBV_VERSION_BUILD_NUMBER_VBV</div>
<Menu>

View File

@ -5,7 +5,6 @@ import MobileMenu from "@/components/header/MobileMenu.vue";
import NotificationPopover from "@/components/notifications/NotificationPopover.vue";
import NotificationPopoverContent from "@/components/notifications/NotificationPopoverContent.vue";
import ItFullScreenModal from "@/components/ui/ItFullScreenModal.vue";
import { useVVByLink } from "@/composables";
import { getLoginURL } from "@/router/utils";
import { useCourseSessionsStore } from "@/stores/courseSessions";
import { useNotificationsStore } from "@/stores/notifications";
@ -17,7 +16,6 @@ import {
getLearningMentorUrl,
getLearningPathUrl,
getMediaCenterUrl,
isVVLearningMentor,
} from "@/utils/utils";
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/vue";
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
@ -31,7 +29,6 @@ const breakpoints = useBreakpoints(breakpointsTailwind);
const userStore = useUserStore();
const courseSessionsStore = useCourseSessionsStore();
const notificationsStore = useNotificationsStore();
const vvBuyLink = useVVByLink();
const {
inCockpit,
inCompetenceProfile,
@ -299,14 +296,6 @@ const hasSessionTitle = computed(() => {
>
<it-icon-media-library class="h-8 w-8" />
</router-link>
<router-link
v-if="isVVLearningMentor(courseSessionsStore.currentCourseSession)"
:to="vvBuyLink.href.value"
data-cy="buy-vv-link"
class="nav-item-no-mobile"
>
{{ $t("a.Lehrgang kaufen") }}
</router-link>
<router-link
v-if="hasAppointmentsMenu"
:to="appointmentsUrl"