refactor: update roleTypeMap type definition for improved clarity
This commit is contained in:
parent
2bda87b5a7
commit
0f4ebc5981
@ -3,7 +3,7 @@ import {t} from '@/locales'
|
|||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
|
|
||||||
const {user} = useStore()
|
const {user} = useStore()
|
||||||
export const roleTypeMap: Record<RoleTypeEnum, string> = {
|
export const roleTypeMap: { [RoleTypeEnum.USER]: string; [RoleTypeEnum.WORKSPACE_MANAGE]: string } = {
|
||||||
...(user.is_admin()
|
...(user.is_admin()
|
||||||
? {
|
? {
|
||||||
[RoleTypeEnum.ADMIN]: t('views.role.systemAdmin'),
|
[RoleTypeEnum.ADMIN]: t('views.role.systemAdmin'),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user