refactor user accounts structure

This commit is contained in:
2026-03-16 00:35:34 +03:30
parent 20be653499
commit 3c9f6eed1d
286 changed files with 2812 additions and 1133 deletions
@@ -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>;
+2
View File
@@ -1,2 +1,4 @@
export * from './accountTypes.const';
export * from './localStorageKeys.const';
export * from './roleTypes.const';
export * from './userRoles.const';
+59
View File
@@ -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>;