Added fetch for single employee and prepared data for access-groups
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { AccessGroup, mapPegaAccessGroupToAccessGroups, PegaAccessGroup } from '@dafa-enums/access-group.enum';
|
||||
import { UserResponse } from './api/user-response.model';
|
||||
|
||||
export interface User {
|
||||
@@ -5,9 +6,14 @@ export interface User {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
userName: string;
|
||||
organization: string;
|
||||
organizationDivision: string;
|
||||
organizationUnit: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
accessGroups: AccessGroup[];
|
||||
utforandeverksamhet: string;
|
||||
service: string;
|
||||
}
|
||||
|
||||
export function mapUserReponseToUser(data: UserResponse): User {
|
||||
@@ -16,8 +22,13 @@ export function mapUserReponseToUser(data: UserResponse): User {
|
||||
lastName: data.pyLastName,
|
||||
firstName: data.pyFirstName,
|
||||
fullName: `${data.pyFirstName} ${data.pyLastName}`,
|
||||
userName: data.pyUserName,
|
||||
organization: data.pyOrganization,
|
||||
organizationDivision: data.pyOrgDivision,
|
||||
organizationUnit: data.pyOrgUnit,
|
||||
phone: data.pyTelephone,
|
||||
email: data.pyAddresses.Email.pyEmailAddress,
|
||||
accessGroups: mapPegaAccessGroupToAccessGroups(data.pyAccessGroup as PegaAccessGroup),
|
||||
utforandeverksamhet: '',
|
||||
service: '',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user