setup route for first user

This commit is contained in:
Julian Krauser 2024-08-25 13:37:23 +02:00
parent 91ff0835fb
commit 6d9e75bb0c
20 changed files with 455 additions and 30 deletions

View file

@ -15,7 +15,7 @@
</SidebarTemplate>
</template>
<template #main>
<component v-if="activeLink?.component" :is="activeLink.component" />
<component v-if="display" :is="displayed" />
<div v-else class="w-full h-full bg-white rounded-lg"></div>
</template>
</SidebarLayout>
@ -39,7 +39,22 @@ export default defineComponent({
},
},
computed: {
...mapState(useNavigationStore, ["activeNavigationObject", "activeTopLevelObject", "activeLink"]),
...mapState(useNavigationStore, [
"activeNavigationObject",
"activeTopLevelObject",
"activeLink",
"componentOverwrite",
]),
display(): boolean {
return this.activeLink?.component || this.componentOverwrite;
},
displayed() {
if (this.componentOverwrite != null) {
return this.componentOverwrite;
} else {
return this.activeLink?.component;
}
},
},
created() {
this.setLink(this.activeTopLevelObject.levelDefault);

View file

@ -1,11 +1,11 @@
<template>
<MainTemplate>
<template v-slot:topBar>
<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">Übersicht</h1>
</div>
</template>
<template v-slot:diffMain>
<template #diffMain>
<div class="flex flex-col gap-2 justify-center items-center h-full"></div>
</template>
</MainTemplate>