From 0da501a81a2093ed61666a7765c766e7aaed824d Mon Sep 17 00:00:00 2001 From: Jens Christian Aanestad <jenscaa@stud.ntnu.no> Date: Fri, 3 May 2024 22:29:44 +0200 Subject: [PATCH] refactor/Added v-if condition for displaying admin in navbar --- src/components/BaseComponents/NavBar.vue | 2 +- src/components/Configuration/ConfigurationSteps/BankAccount.vue | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/BaseComponents/NavBar.vue b/src/components/BaseComponents/NavBar.vue index 3b820b6..8163476 100644 --- a/src/components/BaseComponents/NavBar.vue +++ b/src/components/BaseComponents/NavBar.vue @@ -119,7 +119,7 @@ <img src="@/assets/icons/feedback.svg">Tilbakemelding </router-link> </li> - <li> + <li v-if="useUserInfoStore().role === 'ADMIN'"> <router-link data-cy="admin" class="dropdown-item dropdown-username-link" :to="toSetting()" diff --git a/src/components/Configuration/ConfigurationSteps/BankAccount.vue b/src/components/Configuration/ConfigurationSteps/BankAccount.vue index 7c25f60..9ffde7b 100644 --- a/src/components/Configuration/ConfigurationSteps/BankAccount.vue +++ b/src/components/Configuration/ConfigurationSteps/BankAccount.vue @@ -5,7 +5,6 @@ import { ref } from 'vue' import BaseInput from '@/components/BaseComponents/Input/BaseInput.vue' import { useConfigurationStore } from '@/stores/ConfigurationStore' import { AccountControllerService } from '@/api' -import handleUnknownError from '@/components/Exceptions/unkownErrorHandler' const router = useRouter(); -- GitLab