Added fetch for single employee and prepared data for access-groups
This commit is contained in:
@@ -1,21 +1,11 @@
|
||||
import { mapPegaAccessGroupToAccessGroups, PegaAccessGroup } from '@dafa-enums/access-group.enum';
|
||||
import { Agency } from '@dafa-models/agency.model';
|
||||
import { EmployeeResponse } from './api/employee-response.model';
|
||||
import { Participant } from './participant.model';
|
||||
import { User } from './user.model';
|
||||
|
||||
export interface Employee {
|
||||
id: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
organization: string;
|
||||
organizationDivision: string;
|
||||
organizationUnit: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
accessGroup: string;
|
||||
utforandeverksamhet: string;
|
||||
service: string;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface Employee extends User {}
|
||||
|
||||
export interface EmployeeDetail extends Employee {
|
||||
languages: string[];
|
||||
@@ -42,7 +32,7 @@ export function mapEmployeeReponseToEmployee(data: EmployeeResponse): Employee {
|
||||
organizationUnit: data.pyOrgUnit,
|
||||
phone: data.pyTelephone,
|
||||
email: '',
|
||||
accessGroup: data.pyAccessGroup,
|
||||
accessGroups: mapPegaAccessGroupToAccessGroups(data.pyAccessGroup as PegaAccessGroup),
|
||||
utforandeverksamhet: '',
|
||||
service: '',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user