Adde some options inside the mock-api
This commit is contained in:
committed by
Erik Tiekstra
parent
4f6038b2a6
commit
99db911f39
@@ -3,6 +3,8 @@ import faker from 'faker';
|
||||
faker.locale = 'sv';
|
||||
|
||||
const AVAILABLE_SERVICES = ['KROM', 'STOM', 'KVL'];
|
||||
const STATUSES = ['active', 'follow-up'];
|
||||
const STEPS = ['Gemensam planering', 'Periodisk rapport', 'Resultatrapport', 'Slutrapport'];
|
||||
|
||||
function generateParticipants(amount = 10) {
|
||||
const participants = [];
|
||||
@@ -12,7 +14,9 @@ function generateParticipants(amount = 10) {
|
||||
id,
|
||||
firstName: faker.name.firstName(),
|
||||
lastName: faker.name.lastName(),
|
||||
status: STATUSES[Math.floor(Math.random() * STATUSES.length)],
|
||||
service: AVAILABLE_SERVICES[Math.floor(Math.random() * AVAILABLE_SERVICES.length)],
|
||||
nextStep: STEPS[Math.floor(Math.random() * STEPS.length)],
|
||||
errandNumber: faker.random.number({ min: 100000, max: 999999 }),
|
||||
startDate: faker.date.recent(),
|
||||
endDate: faker.date.future(),
|
||||
|
||||
Reference in New Issue
Block a user