Changes to some models and data coming from API
This commit is contained in:
@@ -6,33 +6,28 @@ export interface Role {
|
||||
}
|
||||
|
||||
export function mapRoleResponseToRoleObject(type: string): Role {
|
||||
switch(type) {
|
||||
case 'OrganizationUser':
|
||||
switch (type) {
|
||||
case 'MSFA_Standard':
|
||||
return {
|
||||
name: 'Basanvändare',
|
||||
type: RoleEnum[type]
|
||||
name: 'Basanvändare',
|
||||
type: RoleEnum[type],
|
||||
};
|
||||
case 'ReportAndPlanning':
|
||||
case 'MSFA_ReportAndPlanning':
|
||||
return {
|
||||
name: 'Rapportering, planering och information om deltagare',
|
||||
type: RoleEnum[type]
|
||||
name: 'Rapportering, planering och information om deltagare',
|
||||
type: RoleEnum[type],
|
||||
};
|
||||
case 'ReceiveDeltagare':
|
||||
case 'MSFA_ReceiveDeltagare':
|
||||
return {
|
||||
name: 'Ta emot deltagare',
|
||||
type: RoleEnum[RoleEnum[type]]
|
||||
type: RoleEnum[RoleEnum[type]],
|
||||
};
|
||||
case 'AuthAdmin':
|
||||
case 'MSFA_AuthAdmin':
|
||||
return {
|
||||
name: 'Administrera behörigheter',
|
||||
type: RoleEnum[RoleEnum[type]]
|
||||
};
|
||||
case 'ContactPerson':
|
||||
return {
|
||||
name: 'Kontaktperson',
|
||||
type: RoleEnum[type]
|
||||
name: 'Administrera behörigheter',
|
||||
type: RoleEnum[RoleEnum[type]],
|
||||
};
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user