diff --git a/src/layout/navigation-menu/index.vue b/src/layout/navigation-menu/index.vue index 56b99e7..357beeb 100644 --- a/src/layout/navigation-menu/index.vue +++ b/src/layout/navigation-menu/index.vue @@ -33,8 +33,20 @@
- - +
+ + +
+
@@ -53,17 +65,34 @@ export default { components: { Search, LoginBtnCustom, LoginBtnKeycloak }, data() { return { - authService: authService + authService: authService, + show_dashboard_link: false, }; }, computed: { isSearchBarVisible() { - return this.$router.currentRoute.path !== "/"; + return this.$router.currentRoute.value.path !== "/"; }, isCustomLogin() { return !this.authService.isKeycloak() + }, + }, + methods: { + update_show_dashboard_link() { + console.log("router pfad: " + this.$router.currentRoute.value.path); + if (this.authService.isUserLoggedIn() + && !this.$router.currentRoute.value.path.includes("dashview")) { + console.log("router pfad: ja, zeigen"); + this.show_dashboard_link = true; + } else { + console.log("router pfad: nicht zeigen"); + this.show_dashboard_link = false; + } } }, + watch: { + $route: "update_show_dashboard_link", + } };