From 7dfbbad70c5e9e38783fa68b06ab48c2ed3fcbdf Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Wed, 21 Aug 2024 10:22:09 +0530 Subject: [PATCH] Improved: added permission check over the 'Go To OMS' button (#270) --- src/components/DxpOmsInstanceNavigator.vue | 3 ++- src/index.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/DxpOmsInstanceNavigator.vue b/src/components/DxpOmsInstanceNavigator.vue index 80bd152d..2f5739de 100644 --- a/src/components/DxpOmsInstanceNavigator.vue +++ b/src/components/DxpOmsInstanceNavigator.vue @@ -11,7 +11,7 @@ {{ $t('This is the name of the OMS you are connected to right now. Make sure that you are connected to the right instance before proceeding.') }} - + {{ $t('Go to OMS') }} @@ -32,6 +32,7 @@ import { goToOms } from '../utils'; import { openOutline } from 'ionicons/icons' import { computed } from 'vue'; import { useAuthStore } from "../store/auth"; +import { appContext } from "src"; const authStore = useAuthStore(); diff --git a/src/index.ts b/src/index.ts index 74f81851..6e814c80 100644 --- a/src/index.ts +++ b/src/index.ts @@ -109,6 +109,8 @@ export let dxpComponents = { loginContext.getConfig = options.getConfig loginContext.initialise = options.initialise + appContext.hasPermission = options.hasPermission + // set a default locale in the state i18n.global.locale.value = useUserStore().getLocale