ff-admin/src/views/account/View.vue

53 lines
1.6 KiB
Vue
Raw Normal View History

2024-11-16 11:19:13 +00:00
<template>
<SidebarLayout>
<template #sidebar>
2024-11-20 09:13:10 +00:00
<SidebarTemplate mainTitle="Mein Account" topTitle="Mitgliederverwaltung" :showTopList="isOwner">
<template v-if="isOwner" #topList>
2024-11-21 14:58:58 +00:00
<RoutingLink
title="Administration"
:link="{ name: 'account-administration' }"
:active="activeRouteName == 'account-administration'"
/>
2024-11-16 11:19:13 +00:00
</template>
<template #list>
2024-11-20 09:02:25 +00:00
<RoutingLink title="Mein Account" :link="{ name: 'account-me' }" :active="activeRouteName == 'account-me'" />
2024-11-20 08:32:52 +00:00
<RoutingLink
title="Anmeldedaten"
:link="{ name: 'account-logindata' }"
:active="activeRouteName == 'account-logindata'"
/>
2024-11-20 09:13:10 +00:00
<RoutingLink
title="Meine Berechtigungen"
:link="{ name: 'account-permission' }"
:active="activeRouteName == 'account-permission'"
/>
2024-11-16 11:19:13 +00:00
</template>
</SidebarTemplate>
</template>
<template #main>
<RouterView />
</template>
</SidebarLayout>
</template>
<script setup lang="ts">
import { defineComponent } from "vue";
import { mapState, mapActions } from "pinia";
import SidebarLayout from "@/layouts/Sidebar.vue";
import SidebarTemplate from "@/templates/Sidebar.vue";
import RoutingLink from "@/components/admin/RoutingLink.vue";
import { RouterView } from "vue-router";
2024-11-20 09:13:10 +00:00
import { useAbilityStore } from "@/stores/ability";
2024-11-16 11:19:13 +00:00
</script>
<script lang="ts">
export default defineComponent({
computed: {
2024-11-20 09:13:10 +00:00
...mapState(useAbilityStore, ["isOwner"]),
2024-11-16 11:19:13 +00:00
activeRouteName() {
return this.$route.name;
},
},
});
</script>