refactor user accounts structure
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export const AccountType = {
|
||||
PARTNER: 'PARTNER',
|
||||
CONSUMER: 'CONSUMER',
|
||||
SUPER_ADMIN: 'SUPER_ADMIN',
|
||||
ADMIN: 'ADMIN',
|
||||
PROVIDER: 'PROVIDER',
|
||||
} as const;
|
||||
|
||||
export type AccountType = (typeof AccountType)[keyof typeof AccountType];
|
||||
|
||||
export const AccountTypeTranslates = {
|
||||
PARTNER: 'شریک تجاری',
|
||||
CONSUMER: 'مصرف کننده',
|
||||
SUPER_ADMIN: 'مدیر کل سیستم',
|
||||
ADMIN: 'مدیر',
|
||||
PROVIDER: 'ارایهدهنده',
|
||||
} as Record<AccountType, string>;
|
||||
@@ -1,2 +1,4 @@
|
||||
export * from './accountTypes.const';
|
||||
export * from './localStorageKeys.const';
|
||||
export * from './roleTypes.const';
|
||||
export * from './userRoles.const';
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
export const PartnerRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR',
|
||||
} as const;
|
||||
|
||||
export type PartnerRole = (typeof PartnerRole)[keyof typeof PartnerRole];
|
||||
|
||||
export const partnerRoleTranslate = {
|
||||
ADMIN: 'مدیر',
|
||||
OPERATOR: 'اپراتور',
|
||||
} as Record<PartnerRole, string>;
|
||||
|
||||
export const ProviderRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR',
|
||||
} as const;
|
||||
|
||||
export type ProviderRole = (typeof ProviderRole)[keyof typeof ProviderRole];
|
||||
|
||||
export const providerRoleTranslate = {
|
||||
ADMIN: 'مدیر',
|
||||
OPERATOR: 'اپراتور',
|
||||
} as Record<ProviderRole, string>;
|
||||
|
||||
export const ComplexRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR',
|
||||
} as const;
|
||||
|
||||
export type ComplexRole = (typeof ComplexRole)[keyof typeof ComplexRole];
|
||||
|
||||
export const complexRoleTranslate = {
|
||||
ADMIN: 'مدیر',
|
||||
OPERATOR: 'اپراتور',
|
||||
} as Record<ComplexRole, string>;
|
||||
|
||||
export const BusinessRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR',
|
||||
} as const;
|
||||
|
||||
export type BusinessRole = (typeof BusinessRole)[keyof typeof BusinessRole];
|
||||
|
||||
export const businessRoleTranslate = {
|
||||
ADMIN: 'مدیر',
|
||||
OPERATOR: 'اپراتور',
|
||||
} as Record<BusinessRole, string>;
|
||||
|
||||
export const POSRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
OPERATOR: 'OPERATOR',
|
||||
} as const;
|
||||
|
||||
export type POSRole = (typeof POSRole)[keyof typeof POSRole];
|
||||
|
||||
export const posRoleTranslate = {
|
||||
ADMIN: 'مدیر',
|
||||
OPERATOR: 'اپراتور',
|
||||
} as Record<POSRole, string>;
|
||||
Reference in New Issue
Block a user