parent
3faf20ac07
commit
028ff05020
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { SETTINGS_ROUTE } from "@/router/names";
|
||||||
import type { User } from "@/stores/user";
|
import type { User } from "@/stores/user";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
|
@ -14,10 +15,14 @@ async function navigate(routeName: string) {
|
||||||
await router.push({ name: routeName });
|
await router.push({ name: routeName });
|
||||||
emit("close");
|
emit("close");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const settingsRoute = {
|
||||||
|
name: SETTINGS_ROUTE,
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="text-black">
|
<div class="flex flex-col gap-4 text-black">
|
||||||
<div class="border-b py-4">
|
<div class="border-b py-4">
|
||||||
<div class="flex justify-start">
|
<div class="flex justify-start">
|
||||||
<div v-if="user.avatar_url">
|
<div v-if="user.avatar_url">
|
||||||
|
|
@ -37,14 +42,19 @@ async function navigate(routeName: string) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<router-link class="flex items-center gap-2" :to="settingsRoute">
|
||||||
|
<it-icon-settings />
|
||||||
|
{{ $t("a.Einstellungen") }}
|
||||||
|
</router-link>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-6 flex items-center"
|
class="flex items-center gap-2"
|
||||||
data-cy="logout-button"
|
data-cy="logout-button"
|
||||||
@click="emit('logout')"
|
@click="emit('logout')"
|
||||||
>
|
>
|
||||||
<it-icon-logout class="inline-block" />
|
<it-icon-logout class="inline-block" />
|
||||||
<span class="ml-1">{{ $t("mainNavigation.logout") }}</span>
|
<span>{{ $t("mainNavigation.logout") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ItFullScreenModal from "@/components/ui/ItFullScreenModal.vue";
|
import ItFullScreenModal from "@/components/ui/ItFullScreenModal.vue";
|
||||||
import { useVVByLink } from "@/composables";
|
import { useVVByLink } from "@/composables";
|
||||||
|
import { SETTINGS_ROUTE } from "@/router/names";
|
||||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||||
import type { User } from "@/stores/user";
|
import type { User } from "@/stores/user";
|
||||||
import type { CourseSession } from "@/types";
|
import type { CourseSession } from "@/types";
|
||||||
|
|
@ -49,6 +50,10 @@ const mentorTabTitle = computed(() =>
|
||||||
? "a.Praxisbildner"
|
? "a.Praxisbildner"
|
||||||
: "a.Lernbegleitung"
|
: "a.Lernbegleitung"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const settingsRoute = {
|
||||||
|
name: SETTINGS_ROUTE,
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -171,15 +176,16 @@ const mentorTabTitle = computed(() =>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<router-link
|
||||||
|
:to="settingsRoute"
|
||||||
|
class="mt-6 flex w-full items-center gap-2 px-4 py-2"
|
||||||
|
active-class="bg-gray-200 text-blue-900 font-bold"
|
||||||
v-if="user?.loggedIn"
|
v-if="user?.loggedIn"
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-6 flex items-center px-4 py-2"
|
|
||||||
>
|
>
|
||||||
<!-- todo: correct action / route -->
|
<it-icon-settings />
|
||||||
<it-icon-settings class="inline-block" />
|
{{ $t("a.Einstellungen") }}
|
||||||
<span class="ml-1">{{ $t("a.Einstellungen") }}</span>
|
</router-link>
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
v-if="user?.loggedIn"
|
v-if="user?.loggedIn"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import {
|
||||||
COMPETENCE_ROUTE,
|
COMPETENCE_ROUTE,
|
||||||
COMPETENCES_ROUTE,
|
COMPETENCES_ROUTE,
|
||||||
SELF_EVALUATION_ROUTE,
|
SELF_EVALUATION_ROUTE,
|
||||||
|
SETTINGS_ROUTE,
|
||||||
} from "./names";
|
} from "./names";
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
|
@ -402,6 +403,7 @@ const router = createRouter({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/settings",
|
path: "/settings",
|
||||||
|
name: SETTINGS_ROUTE,
|
||||||
component: () => import("@/pages/SettingsPage.vue"),
|
component: () => import("@/pages/SettingsPage.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,4 @@ export const COMPETENCE_ROUTE = "competence";
|
||||||
export const CERTIFICATES_ROUTE = "certificates";
|
export const CERTIFICATES_ROUTE = "certificates";
|
||||||
export const SELF_EVALUATION_ROUTE = "selfEvaluationAndFeedback";
|
export const SELF_EVALUATION_ROUTE = "selfEvaluationAndFeedback";
|
||||||
export const COMPETENCES_ROUTE = "competences";
|
export const COMPETENCES_ROUTE = "competences";
|
||||||
|
export const SETTINGS_ROUTE = "settings";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue