75 lines
2.4 KiB
Vue
75 lines
2.4 KiB
Vue
|
<template>
|
||
|
<MainTemplate>
|
||
|
<template #topBar>
|
||
|
<div class="flex flex-row items-center justify-between pt-5 pb-3 px-7">
|
||
|
<h1 class="font-bold text-xl h-8">
|
||
|
Mitglied {{ activeMemberObj?.lastname }}, {{ activeMemberObj?.firstname }}
|
||
|
{{ activeMemberObj?.nameaffix ? `- ${activeMemberObj?.nameaffix}` : "" }}
|
||
|
</h1>
|
||
|
</div>
|
||
|
</template>
|
||
|
<template #diffMain>
|
||
|
<div class="flex flex-col gap-2 grow px-7 overflow-hidden">
|
||
|
<div class="flex flex-col grow gap-2 overflow-hidden">
|
||
|
<div class="w-full flex flex-row max-lg:flex-wrap justify-center">
|
||
|
<RouterLink
|
||
|
v-for="tab in tabs"
|
||
|
:key="tab.route"
|
||
|
v-slot="{ isActive }"
|
||
|
:to="{ name: tab.route }"
|
||
|
class="w-1/2 md:w-1/3 lg:w-full p-0.5 first:pl-0 last:pr-0"
|
||
|
>
|
||
|
<p
|
||
|
:class="[
|
||
|
'w-full rounded-lg py-2.5 text-sm text-center font-medium leading-5 focus:ring-0 outline-none',
|
||
|
isActive ? 'bg-red-200 shadow border-b-2 border-primary rounded-b-none' : ' hover:bg-red-200',
|
||
|
]"
|
||
|
>
|
||
|
{{ tab.title }}
|
||
|
</p>
|
||
|
</RouterLink>
|
||
|
</div>
|
||
|
<RouterView />
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
</MainTemplate>
|
||
|
</template>
|
||
|
|
||
|
<script setup lang="ts">
|
||
|
import { defineComponent } from "vue";
|
||
|
import { mapActions, mapState } from "pinia";
|
||
|
import MainTemplate from "@/templates/Main.vue";
|
||
|
import { RouterLink, RouterView } from "vue-router";
|
||
|
import { useMemberStore } from "@/stores/admin/member";
|
||
|
</script>
|
||
|
|
||
|
<script lang="ts">
|
||
|
export default defineComponent({
|
||
|
props: {
|
||
|
memberId: String,
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
tabs: [
|
||
|
{ route: "admin-club-member-overview", title: "Übersicht" },
|
||
|
{ route: "admin-club-member-membership", title: "Mitgliedschaft" },
|
||
|
{ route: "admin-club-member-communication", title: "Kommunikation" },
|
||
|
{ route: "admin-club-member-awards", title: "Auszeichnungen" },
|
||
|
{ route: "admin-club-member-qualifications", title: "Qualificationen" },
|
||
|
{ route: "admin-club-member-positions", title: "Vereinsämter" },
|
||
|
],
|
||
|
};
|
||
|
},
|
||
|
computed: {
|
||
|
...mapState(useMemberStore, ["activeMemberObj"]),
|
||
|
},
|
||
|
mounted() {
|
||
|
this.fetchMemberByActiveId();
|
||
|
},
|
||
|
methods: {
|
||
|
...mapActions(useMemberStore, ["fetchMemberByActiveId"]),
|
||
|
},
|
||
|
});
|
||
|
</script>
|