Some checks failed
Build frontend / build (push) Failing after 45s
- CustomerType: PERSONAL=0, FAMILY=1 (was 'Personal', 'Family') - OwnerType: PERSON=0, REAL_ESTATE_AGENCY=1 (was 'peerson', 'RealEstateAgency') - Backend Type column is int(11), sending strings caused 415 errors
28 lines
623 B
JavaScript
28 lines
623 B
JavaScript
/**
|
|
* UserRole Enum
|
|
* User account roles in the system
|
|
* Derived from JWT token claims
|
|
*/
|
|
const UserRole = Object.freeze({
|
|
GUEST: 'guest',
|
|
CUSTOMER: 'customer',
|
|
OWNER: 'owner',
|
|
ADMIN: 'admin',
|
|
});
|
|
|
|
const UserRoleLabels = Object.freeze({
|
|
[UserRole.GUEST]: 'زائر',
|
|
[UserRole.CUSTOMER]: 'مستأجر',
|
|
[UserRole.OWNER]: 'مالك عقار',
|
|
[UserRole.ADMIN]: 'مدير النظام',
|
|
});
|
|
|
|
const UserRoleColors = Object.freeze({
|
|
[UserRole.GUEST]: 'gray',
|
|
[UserRole.CUSTOMER]: 'blue',
|
|
[UserRole.OWNER]: 'amber',
|
|
[UserRole.ADMIN]: 'red',
|
|
});
|
|
|
|
export { UserRole, UserRoleLabels, UserRoleColors };
|