add role with id 3 as 'No access' in transformation

This commit is contained in:
Davor 2022-06-10 16:09:07 +02:00
parent a1f04bc367
commit 2999beb5be

View file

@ -6,6 +6,8 @@ const transformRoleById = (roleId: any): UserRole => {
return UserRole.Admin; return UserRole.Admin;
case 2: case 2:
return UserRole.User; return UserRole.User;
case 3:
return UserRole.NoAccess;
default: default:
return UserRole.NoAccess; return UserRole.NoAccess;
} }
@ -17,6 +19,8 @@ const transformRoleIdByRole = (role: UserRole | null): number | null => {
return 1; return 1;
case UserRole.User: case UserRole.User:
return 2; return 2;
case UserRole.NoAccess:
return 3;
default: default:
return null; return null;
} }