Updated employees mock-api
This commit is contained in:
@@ -7,7 +7,7 @@ faker.locale = 'sv';
|
||||
|
||||
const TJANSTER = tjanster.generate();
|
||||
const UTFORANDEVERKSAMHETER = utforandeVerksamheter.generate();
|
||||
const ROLES = ['ReportAndPlanning', 'ReceiveDeltagare', 'AuthAdmin', 'ContactPerson'];
|
||||
const ROLES = ['MSFA_AuthAdmin', 'MSFA_ReceiveDeltagare', 'MSFA_ReportAndPlanning'];
|
||||
|
||||
function generateEmployees(amount = 10) {
|
||||
const employees = [];
|
||||
@@ -34,8 +34,8 @@ function generateEmployees(amount = 10) {
|
||||
})}`,
|
||||
email: faker.internet.email(firstName.toLowerCase(), lastName.toLowerCase()),
|
||||
roles: hasBehorigheter
|
||||
? ['OrganizationUser', ...chooseRandom(ROLES, faker.datatype.number({ min: 1, max: ROLES.length }))]
|
||||
: ['OrganizationUser'],
|
||||
? ['MSFA_Standard', ...chooseRandom(ROLES, faker.datatype.number({ min: 1, max: ROLES.length }))]
|
||||
: ['MSFA_Standard'],
|
||||
tjanst: hasBehorigheter ? currentTjanster.map(tjanst => tjanst.label) : [],
|
||||
tjansteKoder: hasBehorigheter ? currentTjanster.map(tjanst => tjanst.id) : [],
|
||||
allaUtforandeVerksamheter: faker.datatype.boolean(),
|
||||
|
||||
Reference in New Issue
Block a user