fix chart
This commit is contained in:
@@ -2,6 +2,7 @@ import { type ComputedRef, ref } from 'vue'
|
||||
import type { User } from '@/model/user'
|
||||
import { getMyInformation } from '@/api/user'
|
||||
import { get } from 'lodash'
|
||||
import { isDeployAdmin } from '@/utils/deployAdmin'
|
||||
export const useUserStore = defineStore('user', () => {
|
||||
const userInfo = ref<User | undefined>(undefined)
|
||||
|
||||
@@ -29,5 +30,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
return userInfo.value?.is_admin
|
||||
})
|
||||
|
||||
return { userInfo, getMyInfo, permissions, canAccess, isAdmin }
|
||||
const isDeployAdminUser = computed(() => isDeployAdmin(userInfo.value?.mobile))
|
||||
|
||||
return { userInfo, getMyInfo, permissions, canAccess, isAdmin, isDeployAdminUser }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user