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:
parent
6b61f448f0
commit
5ecce4232a
|
|
@ -1,13 +1,18 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useVVByLink } from "@/composables";
|
||||||
import { SUPPORT_LOCALES } from "@/i18nextWrapper";
|
import { SUPPORT_LOCALES } from "@/i18nextWrapper";
|
||||||
|
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||||
import type { AvailableLanguages } from "@/stores/user";
|
import type { AvailableLanguages } from "@/stores/user";
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
|
import { isVVLearningMentor } from "@/utils/utils";
|
||||||
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue";
|
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue";
|
||||||
import * as log from "loglevel";
|
import * as log from "loglevel";
|
||||||
|
|
||||||
log.debug("AppFooter created");
|
log.debug("AppFooter created");
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
const courseSessionsStore = useCourseSessionsStore();
|
||||||
|
const vvBuyLink = useVVByLink();
|
||||||
const hideVersion = (import.meta.env.VITE_APP_ENVIRONMENT || "local").startsWith(
|
const hideVersion = (import.meta.env.VITE_APP_ENVIRONMENT || "local").startsWith(
|
||||||
"prod"
|
"prod"
|
||||||
);
|
);
|
||||||
|
|
@ -30,6 +35,14 @@ async function changeLocale(language: AvailableLanguages) {
|
||||||
{{ $t("footer.imprintText") }}
|
{{ $t("footer.imprintText") }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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="flex-grow"></div>
|
||||||
<div :class="{ hidden: hideVersion }">VBV_VERSION_BUILD_NUMBER_VBV</div>
|
<div :class="{ hidden: hideVersion }">VBV_VERSION_BUILD_NUMBER_VBV</div>
|
||||||
<Menu>
|
<Menu>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import MobileMenu from "@/components/header/MobileMenu.vue";
|
||||||
import NotificationPopover from "@/components/notifications/NotificationPopover.vue";
|
import NotificationPopover from "@/components/notifications/NotificationPopover.vue";
|
||||||
import NotificationPopoverContent from "@/components/notifications/NotificationPopoverContent.vue";
|
import NotificationPopoverContent from "@/components/notifications/NotificationPopoverContent.vue";
|
||||||
import ItFullScreenModal from "@/components/ui/ItFullScreenModal.vue";
|
import ItFullScreenModal from "@/components/ui/ItFullScreenModal.vue";
|
||||||
import { useVVByLink } from "@/composables";
|
|
||||||
import { getLoginURL } from "@/router/utils";
|
import { getLoginURL } from "@/router/utils";
|
||||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||||
import { useNotificationsStore } from "@/stores/notifications";
|
import { useNotificationsStore } from "@/stores/notifications";
|
||||||
|
|
@ -17,7 +16,6 @@ import {
|
||||||
getLearningMentorUrl,
|
getLearningMentorUrl,
|
||||||
getLearningPathUrl,
|
getLearningPathUrl,
|
||||||
getMediaCenterUrl,
|
getMediaCenterUrl,
|
||||||
isVVLearningMentor,
|
|
||||||
} from "@/utils/utils";
|
} from "@/utils/utils";
|
||||||
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/vue";
|
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/vue";
|
||||||
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
|
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
|
||||||
|
|
@ -31,7 +29,6 @@ const breakpoints = useBreakpoints(breakpointsTailwind);
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const courseSessionsStore = useCourseSessionsStore();
|
const courseSessionsStore = useCourseSessionsStore();
|
||||||
const notificationsStore = useNotificationsStore();
|
const notificationsStore = useNotificationsStore();
|
||||||
const vvBuyLink = useVVByLink();
|
|
||||||
const {
|
const {
|
||||||
inCockpit,
|
inCockpit,
|
||||||
inCompetenceProfile,
|
inCompetenceProfile,
|
||||||
|
|
@ -299,14 +296,6 @@ const hasSessionTitle = computed(() => {
|
||||||
>
|
>
|
||||||
<it-icon-media-library class="h-8 w-8" />
|
<it-icon-media-library class="h-8 w-8" />
|
||||||
</router-link>
|
</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
|
<router-link
|
||||||
v-if="hasAppointmentsMenu"
|
v-if="hasAppointmentsMenu"
|
||||||
:to="appointmentsUrl"
|
:to="appointmentsUrl"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue