edit SMSpanel
This commit is contained in:
@@ -25,6 +25,7 @@ import BasicMenu from '@/components/BasicMenu/index.vue'
|
||||
import { useRouterStore } from '@core/stores/router'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import { isDeployAdmin } from '@/utils/deployAdmin'
|
||||
import { hasSmsPanelAccess, isSmsBillingEnabled } from '@/utils/smsPanelAccess'
|
||||
import { bannerEnabledSetting } from '@/utils/config'
|
||||
import { get } from 'lodash'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
@@ -38,6 +39,11 @@ const menu = computed(() => {
|
||||
return children
|
||||
.filter((child) => !child.meta?.hideMenu)
|
||||
.filter((child) => child.name !== 'banners' || bannerEnabledSetting.value)
|
||||
.filter(
|
||||
(child) =>
|
||||
!child.meta?.requiresSmsPanelAccess ||
|
||||
(isSmsBillingEnabled(userStore.userInfo) && hasSmsPanelAccess(userStore.userInfo))
|
||||
)
|
||||
.filter(
|
||||
(child) =>
|
||||
!child.meta?.deployAdminOnly || isDeployAdmin(userStore.userInfo?.mobile)
|
||||
|
||||
Reference in New Issue
Block a user