edit SMSpanel

This commit is contained in:
2026-07-04 14:21:27 +03:30
parent 40d04a2dfb
commit f7cc5180b1
19 changed files with 2745 additions and 249 deletions
+14 -1
View File
@@ -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
}
})