edit SMSpanel
This commit is contained in:
+14
-1
@@ -3,6 +3,7 @@ import type { User } from '@/model/user'
|
||||
import { getMyInformation } from '@/api/user'
|
||||
import { get } from 'lodash'
|
||||
import { isDeployAdmin } from '@/utils/deployAdmin'
|
||||
import { hasSmsPanelAccess, isSmsBillingEnabled } from '@/utils/smsPanelAccess'
|
||||
export const useUserStore = defineStore('user', () => {
|
||||
const userInfo = ref<User | undefined>(undefined)
|
||||
|
||||
@@ -32,5 +33,17 @@ export const useUserStore = defineStore('user', () => {
|
||||
|
||||
const isDeployAdminUser = computed(() => isDeployAdmin(userInfo.value?.mobile))
|
||||
|
||||
return { userInfo, getMyInfo, permissions, canAccess, isAdmin, isDeployAdminUser }
|
||||
const smsPanelAccess = computed(() => hasSmsPanelAccess(userInfo.value))
|
||||
const smsBillingEnabled = computed(() => isSmsBillingEnabled(userInfo.value))
|
||||
|
||||
return {
|
||||
userInfo,
|
||||
getMyInfo,
|
||||
permissions,
|
||||
canAccess,
|
||||
isAdmin,
|
||||
isDeployAdminUser,
|
||||
smsPanelAccess,
|
||||
smsBillingEnabled
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user