Adde some options inside the mock-api

This commit is contained in:
Erik Tiekstra
2021-03-29 12:13:06 +02:00
committed by Erik Tiekstra
parent 4f6038b2a6
commit 99db911f39
5 changed files with 443 additions and 334 deletions

View File

@@ -1,9 +1,6 @@
{ {
"/api": { "/api": {
"target": "http://localhost:8000/", "target": "http://localhost:8000/",
"secure": false, "secure": false
"pathRewrite": {
"^/api": "/"
}
} }
} }

View File

@@ -2,513 +2,615 @@
"participants": [ "participants": [
{ {
"id": 0, "id": 0,
"firstName": "Zachariah", "firstName": "Sylvan",
"lastName": "Gustafsson", "lastName": "Johansson",
"service": "KROM", "status": "follow-up",
"errandNumber": 536849, "service": "KVL",
"startDate": "2021-03-29T03:35:58.817Z", "nextStep": "Slutrapport",
"endDate": "2021-12-30T13:16:57.069Z", "errandNumber": 147730,
"handleBefore": "2021-03-30T04:28:41.898Z" "startDate": "2021-03-28T16:28:07.794Z",
"endDate": "2021-06-30T23:00:44.013Z",
"handleBefore": "2021-03-30T06:57:29.052Z"
}, },
{ {
"id": 1, "id": 1,
"firstName": "Lane", "firstName": "Earl",
"lastName": "Olsson", "lastName": "Svensson",
"status": "active",
"service": "KVL", "service": "KVL",
"errandNumber": 567126, "nextStep": "Periodisk rapport",
"startDate": "2021-03-28T09:59:48.777Z", "errandNumber": 902364,
"endDate": "2022-03-18T16:18:38.242Z", "startDate": "2021-03-28T13:38:13.389Z",
"handleBefore": "2021-03-29T09:45:03.024Z" "endDate": "2021-03-31T03:16:34.426Z",
"handleBefore": "2021-03-30T05:12:29.354Z"
}, },
{ {
"id": 2, "id": 2,
"firstName": "Desmond", "firstName": "Aric",
"lastName": "Nilsson", "lastName": "Olsson",
"service": "STOM", "status": "follow-up",
"errandNumber": 438670, "service": "KROM",
"startDate": "2021-03-28T20:16:58.352Z", "nextStep": "Periodisk rapport",
"endDate": "2021-08-14T12:52:17.152Z", "errandNumber": 300957,
"handleBefore": "2021-03-29T15:16:38.831Z" "startDate": "2021-03-29T06:05:38.758Z",
"endDate": "2022-01-06T05:44:27.982Z",
"handleBefore": "2021-03-29T16:03:11.667Z"
}, },
{ {
"id": 3, "id": 3,
"firstName": "Joyce", "firstName": "Summer",
"lastName": "Persson", "lastName": "Gustafsson",
"service": "STOM", "status": "active",
"errandNumber": 487945, "service": "KVL",
"startDate": "2021-03-29T01:45:42.364Z", "nextStep": "Slutrapport",
"endDate": "2021-04-28T05:27:50.553Z", "errandNumber": 362866,
"handleBefore": "2021-03-29T12:28:42.680Z" "startDate": "2021-03-29T05:30:07.229Z",
"endDate": "2022-02-06T14:09:22.759Z",
"handleBefore": "2021-03-30T04:31:53.552Z"
}, },
{ {
"id": 4, "id": 4,
"firstName": "Kasandra", "firstName": "Valentina",
"lastName": "Karlsson", "lastName": "Andersson",
"service": "KVL", "status": "follow-up",
"errandNumber": 803191, "service": "STOM",
"startDate": "2021-03-28T22:58:56.665Z", "nextStep": "Gemensam planering",
"endDate": "2021-07-20T12:24:55.428Z", "errandNumber": 576525,
"handleBefore": "2021-03-29T19:19:09.039Z" "startDate": "2021-03-29T02:40:55.380Z",
"endDate": "2021-12-11T00:01:20.021Z",
"handleBefore": "2021-03-29T20:32:00.896Z"
}, },
{ {
"id": 5, "id": 5,
"firstName": "Crystal", "firstName": "Jake",
"lastName": "Gustafsson", "lastName": "Johansson",
"status": "active",
"service": "STOM", "service": "STOM",
"errandNumber": 618306, "nextStep": "Periodisk rapport",
"startDate": "2021-03-29T04:36:23.159Z", "errandNumber": 160895,
"endDate": "2022-02-05T20:19:50.325Z", "startDate": "2021-03-28T21:11:27.938Z",
"handleBefore": "2021-03-29T20:46:28.338Z" "endDate": "2021-11-10T08:16:47.526Z",
"handleBefore": "2021-03-29T16:26:33.981Z"
}, },
{ {
"id": 6, "id": 6,
"firstName": "Dino", "firstName": "Josiane",
"lastName": "Persson", "lastName": "Svensson",
"status": "follow-up",
"service": "KROM", "service": "KROM",
"errandNumber": 747042, "nextStep": "Periodisk rapport",
"startDate": "2021-03-28T23:31:14.203Z", "errandNumber": 727637,
"endDate": "2021-11-05T04:37:14.244Z", "startDate": "2021-03-28T22:14:57.943Z",
"handleBefore": "2021-03-30T06:46:18.982Z" "endDate": "2021-06-20T10:01:40.930Z",
"handleBefore": "2021-03-29T13:04:51.388Z"
}, },
{ {
"id": 7, "id": 7,
"firstName": "Clarabelle", "firstName": "Quinten",
"lastName": "Persson", "lastName": "Johansson",
"service": "KVL", "status": "follow-up",
"errandNumber": 840619, "service": "KROM",
"startDate": "2021-03-28T12:41:19.758Z", "nextStep": "Gemensam planering",
"endDate": "2021-12-12T10:47:21.005Z", "errandNumber": 920335,
"handleBefore": "2021-03-29T17:58:23.043Z" "startDate": "2021-03-29T08:31:07.560Z",
"endDate": "2022-01-18T23:37:37.047Z",
"handleBefore": "2021-03-29T16:56:00.005Z"
}, },
{ {
"id": 8, "id": 8,
"firstName": "Kelley", "firstName": "Candida",
"lastName": "Larsson", "lastName": "Olsson",
"status": "active",
"service": "KROM", "service": "KROM",
"errandNumber": 759971, "nextStep": "Gemensam planering",
"startDate": "2021-03-29T01:35:07.331Z", "errandNumber": 649168,
"endDate": "2021-05-11T05:56:37.947Z", "startDate": "2021-03-28T12:50:15.539Z",
"handleBefore": "2021-03-29T22:56:29.566Z" "endDate": "2021-09-03T04:03:48.573Z",
"handleBefore": "2021-03-29T15:06:25.417Z"
}, },
{ {
"id": 9, "id": 9,
"firstName": "Noemy", "firstName": "Eugenia",
"lastName": "Eriksson", "lastName": "Eriksson",
"service": "STOM", "status": "active",
"errandNumber": 733022, "service": "KROM",
"startDate": "2021-03-28T17:33:07.590Z", "nextStep": "Gemensam planering",
"endDate": "2022-03-28T11:57:02.399Z", "errandNumber": 762553,
"handleBefore": "2021-03-29T18:40:48.693Z" "startDate": "2021-03-28T11:35:26.356Z",
"endDate": "2021-12-01T09:26:41.043Z",
"handleBefore": "2021-03-29T18:07:01.531Z"
}, },
{ {
"id": 10, "id": 10,
"firstName": "Camryn", "firstName": "Lottie",
"lastName": "Larsson", "lastName": "Persson",
"service": "KVL", "status": "active",
"errandNumber": 975949, "service": "KROM",
"startDate": "2021-03-29T05:44:22.261Z", "nextStep": "Gemensam planering",
"endDate": "2021-07-01T07:11:45.448Z", "errandNumber": 926796,
"handleBefore": "2021-03-29T08:34:21.991Z" "startDate": "2021-03-28T16:30:44.119Z",
"endDate": "2021-12-30T16:55:39.528Z",
"handleBefore": "2021-03-29T17:36:16.668Z"
}, },
{ {
"id": 11, "id": 11,
"firstName": "Susanna", "firstName": "Kaela",
"lastName": "Gustafsson", "lastName": "Nilsson",
"status": "follow-up",
"service": "KVL", "service": "KVL",
"errandNumber": 633058, "nextStep": "Slutrapport",
"startDate": "2021-03-28T09:55:34.767Z", "errandNumber": 360006,
"endDate": "2021-12-24T16:16:54.023Z", "startDate": "2021-03-28T12:09:55.862Z",
"handleBefore": "2021-03-29T22:46:14.021Z" "endDate": "2022-01-25T14:28:57.646Z",
"handleBefore": "2021-03-29T17:18:33.368Z"
}, },
{ {
"id": 12, "id": 12,
"firstName": "Charlotte", "firstName": "Albertha",
"lastName": "Eriksson", "lastName": "Gustafsson",
"status": "follow-up",
"service": "KROM", "service": "KROM",
"errandNumber": 274938, "nextStep": "Gemensam planering",
"startDate": "2021-03-29T07:24:08.879Z", "errandNumber": 791607,
"endDate": "2022-03-12T12:50:47.862Z", "startDate": "2021-03-28T11:24:56.699Z",
"handleBefore": "2021-03-29T19:07:36.447Z" "endDate": "2021-12-16T23:42:03.112Z",
"handleBefore": "2021-03-29T18:29:09.000Z"
}, },
{ {
"id": 13, "id": 13,
"firstName": "Malcolm", "firstName": "Kobe",
"lastName": "Persson", "lastName": "Karlsson",
"status": "active",
"service": "KROM", "service": "KROM",
"errandNumber": 700835, "nextStep": "Slutrapport",
"startDate": "2021-03-28T12:21:10.957Z", "errandNumber": 785520,
"endDate": "2021-08-09T00:09:38.945Z", "startDate": "2021-03-28T17:13:27.345Z",
"handleBefore": "2021-03-29T16:50:18.821Z" "endDate": "2021-08-04T12:28:00.694Z",
"handleBefore": "2021-03-30T04:19:30.576Z"
}, },
{ {
"id": 14, "id": 14,
"firstName": "Marisa", "firstName": "Brandt",
"lastName": "Nilsson", "lastName": "Eriksson",
"status": "active",
"service": "KVL", "service": "KVL",
"errandNumber": 720806, "nextStep": "Resultatrapport",
"startDate": "2021-03-28T14:52:48.860Z", "errandNumber": 806698,
"endDate": "2021-10-22T18:06:19.433Z", "startDate": "2021-03-29T06:01:31.101Z",
"handleBefore": "2021-03-29T12:48:49.611Z" "endDate": "2021-07-30T14:09:12.799Z",
"handleBefore": "2021-03-29T18:05:23.136Z"
}, },
{ {
"id": 15, "id": 15,
"firstName": "Naomi", "firstName": "Furman",
"lastName": "Andersson", "lastName": "Andersson",
"status": "follow-up",
"service": "KROM", "service": "KROM",
"errandNumber": 117130, "nextStep": "Slutrapport",
"startDate": "2021-03-28T08:43:04.765Z", "errandNumber": 380941,
"endDate": "2022-03-24T09:03:55.824Z", "startDate": "2021-03-28T11:18:40.665Z",
"handleBefore": "2021-03-29T20:18:05.130Z" "endDate": "2021-12-19T23:35:40.116Z",
"handleBefore": "2021-03-29T11:42:41.840Z"
}, },
{ {
"id": 16, "id": 16,
"firstName": "Dion", "firstName": "Garnet",
"lastName": "Eriksson", "lastName": "Karlsson",
"service": "STOM", "status": "follow-up",
"errandNumber": 345480, "service": "KVL",
"startDate": "2021-03-28T12:17:25.708Z", "nextStep": "Slutrapport",
"endDate": "2021-09-28T12:10:52.671Z", "errandNumber": 343414,
"handleBefore": "2021-03-29T17:42:58.460Z" "startDate": "2021-03-28T18:35:28.474Z",
"endDate": "2022-03-27T23:04:47.438Z",
"handleBefore": "2021-03-29T15:34:17.550Z"
}, },
{ {
"id": 17, "id": 17,
"firstName": "Brody", "firstName": "Gerry",
"lastName": "Johansson", "lastName": "Gustafsson",
"service": "STOM", "status": "active",
"errandNumber": 733022, "service": "KVL",
"startDate": "2021-03-28T18:35:38.651Z", "nextStep": "Slutrapport",
"endDate": "2021-05-17T12:34:03.549Z", "errandNumber": 306829,
"handleBefore": "2021-03-29T12:31:34.183Z" "startDate": "2021-03-28T14:02:39.202Z",
"endDate": "2021-09-20T16:35:32.289Z",
"handleBefore": "2021-03-30T02:20:15.076Z"
}, },
{ {
"id": 18, "id": 18,
"firstName": "Luisa", "firstName": "Kira",
"lastName": "Svensson", "lastName": "Persson",
"status": "follow-up",
"service": "KROM", "service": "KROM",
"errandNumber": 824872, "nextStep": "Periodisk rapport",
"startDate": "2021-03-28T08:31:02.690Z", "errandNumber": 920825,
"endDate": "2022-03-05T15:55:07.194Z", "startDate": "2021-03-28T20:51:18.738Z",
"handleBefore": "2021-03-30T06:12:51.675Z" "endDate": "2021-07-07T01:58:00.717Z",
"handleBefore": "2021-03-30T01:41:48.646Z"
}, },
{ {
"id": 19, "id": 19,
"firstName": "Adrian", "firstName": "Estefania",
"lastName": "Johansson", "lastName": "Eriksson",
"service": "KVL", "status": "follow-up",
"errandNumber": 525875, "service": "KROM",
"startDate": "2021-03-28T15:00:30.790Z", "nextStep": "Periodisk rapport",
"endDate": "2021-12-16T21:06:46.317Z", "errandNumber": 400245,
"handleBefore": "2021-03-29T11:53:52.678Z" "startDate": "2021-03-28T15:24:01.255Z",
"endDate": "2021-11-21T04:49:07.681Z",
"handleBefore": "2021-03-30T07:55:07.827Z"
}, },
{ {
"id": 20, "id": 20,
"firstName": "Eric", "firstName": "Lisette",
"lastName": "Andersson", "lastName": "Nilsson",
"service": "KVL", "status": "follow-up",
"errandNumber": 197879, "service": "KROM",
"startDate": "2021-03-28T18:38:22.793Z", "nextStep": "Gemensam planering",
"endDate": "2021-09-20T17:47:21.243Z", "errandNumber": 789946,
"handleBefore": "2021-03-29T11:24:02.884Z" "startDate": "2021-03-28T16:53:07.076Z",
"endDate": "2021-07-17T10:17:31.793Z",
"handleBefore": "2021-03-30T02:20:58.528Z"
}, },
{ {
"id": 21, "id": 21,
"firstName": "Imelda", "firstName": "Jasen",
"lastName": "Nilsson", "lastName": "Eriksson",
"service": "STOM", "status": "follow-up",
"errandNumber": 889134, "service": "KROM",
"startDate": "2021-03-29T06:25:32.344Z", "nextStep": "Gemensam planering",
"endDate": "2021-08-24T18:30:44.496Z", "errandNumber": 101872,
"handleBefore": "2021-03-29T12:53:13.009Z" "startDate": "2021-03-28T17:39:54.421Z",
"endDate": "2021-03-30T12:27:40.493Z",
"handleBefore": "2021-03-29T17:58:42.082Z"
}, },
{ {
"id": 22, "id": 22,
"firstName": "Domenick", "firstName": "Beth",
"lastName": "Johansson", "lastName": "Karlsson",
"service": "KROM", "status": "follow-up",
"errandNumber": 907567, "service": "STOM",
"startDate": "2021-03-29T05:55:01.203Z", "nextStep": "Slutrapport",
"endDate": "2021-12-13T04:53:58.357Z", "errandNumber": 974705,
"handleBefore": "2021-03-29T08:08:40.717Z" "startDate": "2021-03-28T18:32:44.266Z",
"endDate": "2022-02-02T15:14:11.536Z",
"handleBefore": "2021-03-29T16:55:12.823Z"
}, },
{ {
"id": 23, "id": 23,
"firstName": "Connor", "firstName": "Lon",
"lastName": "Olsson", "lastName": "Svensson",
"service": "KVL", "status": "active",
"errandNumber": 119431, "service": "STOM",
"startDate": "2021-03-29T06:27:18.505Z", "nextStep": "Resultatrapport",
"endDate": "2021-12-23T09:46:40.014Z", "errandNumber": 416324,
"handleBefore": "2021-03-29T19:50:17.445Z" "startDate": "2021-03-29T01:37:00.663Z",
"endDate": "2021-07-05T02:18:00.931Z",
"handleBefore": "2021-03-30T01:52:29.572Z"
}, },
{ {
"id": 24, "id": 24,
"firstName": "Ceasar", "firstName": "Mae",
"lastName": "Eriksson", "lastName": "Eriksson",
"status": "active",
"service": "STOM", "service": "STOM",
"errandNumber": 461247, "nextStep": "Periodisk rapport",
"startDate": "2021-03-28T17:57:54.869Z", "errandNumber": 142285,
"endDate": "2022-03-12T03:31:12.605Z", "startDate": "2021-03-29T08:59:39.735Z",
"handleBefore": "2021-03-30T03:13:10.115Z" "endDate": "2021-07-02T18:14:59.899Z",
"handleBefore": "2021-03-29T12:08:55.702Z"
}, },
{ {
"id": 25, "id": 25,
"firstName": "Kacey", "firstName": "Lue",
"lastName": "Svensson", "lastName": "Karlsson",
"service": "STOM", "status": "active",
"errandNumber": 447832, "service": "KVL",
"startDate": "2021-03-28T10:07:40.693Z", "nextStep": "Gemensam planering",
"endDate": "2022-01-15T15:16:33.983Z", "errandNumber": 305522,
"handleBefore": "2021-03-29T22:47:15.698Z" "startDate": "2021-03-28T11:56:14.815Z",
"endDate": "2021-06-05T23:30:18.769Z",
"handleBefore": "2021-03-30T02:56:48.120Z"
}, },
{ {
"id": 26, "id": 26,
"firstName": "Moshe", "firstName": "Darwin",
"lastName": "Svensson", "lastName": "Gustafsson",
"service": "KROM", "status": "follow-up",
"errandNumber": 183189, "service": "STOM",
"startDate": "2021-03-28T12:07:57.729Z", "nextStep": "Gemensam planering",
"endDate": "2022-02-12T01:22:42.084Z", "errandNumber": 826609,
"handleBefore": "2021-03-30T06:53:20.641Z" "startDate": "2021-03-29T05:14:27.146Z",
"endDate": "2021-10-30T17:28:22.871Z",
"handleBefore": "2021-03-29T12:24:53.977Z"
}, },
{ {
"id": 27, "id": 27,
"firstName": "Dexter", "firstName": "Cyril",
"lastName": "Larsson", "lastName": "Persson",
"status": "active",
"service": "KROM", "service": "KROM",
"errandNumber": 936851, "nextStep": "Slutrapport",
"startDate": "2021-03-28T20:51:25.418Z", "errandNumber": 472203,
"endDate": "2021-08-02T23:04:59.337Z", "startDate": "2021-03-28T20:30:32.522Z",
"handleBefore": "2021-03-29T17:56:43.768Z" "endDate": "2021-04-23T14:50:16.407Z",
"handleBefore": "2021-03-29T15:26:50.894Z"
}, },
{ {
"id": 28, "id": 28,
"firstName": "Waino", "firstName": "Hans",
"lastName": "Andersson", "lastName": "Svensson",
"status": "active",
"service": "KROM", "service": "KROM",
"errandNumber": 321404, "nextStep": "Resultatrapport",
"startDate": "2021-03-28T15:23:11.190Z", "errandNumber": 569704,
"endDate": "2021-09-05T17:48:33.661Z", "startDate": "2021-03-29T05:31:51.218Z",
"handleBefore": "2021-03-30T05:13:00.841Z" "endDate": "2021-07-13T15:20:16.360Z",
"handleBefore": "2021-03-29T23:28:11.072Z"
}, },
{ {
"id": 29, "id": 29,
"firstName": "Hilma", "firstName": "Nella",
"lastName": "Olsson", "lastName": "Olsson",
"status": "active",
"service": "KROM", "service": "KROM",
"errandNumber": 587769, "nextStep": "Resultatrapport",
"startDate": "2021-03-28T23:09:30.690Z", "errandNumber": 546340,
"endDate": "2021-05-29T07:29:27.511Z", "startDate": "2021-03-28T13:03:21.465Z",
"handleBefore": "2021-03-30T05:26:06.647Z" "endDate": "2021-07-14T15:57:27.664Z",
"handleBefore": "2021-03-30T03:41:45.536Z"
}, },
{ {
"id": 30, "id": 30,
"firstName": "Kian", "firstName": "Leila",
"lastName": "Gustafsson", "lastName": "Gustafsson",
"status": "follow-up",
"service": "KVL", "service": "KVL",
"errandNumber": 383043, "nextStep": "Slutrapport",
"startDate": "2021-03-29T00:48:54.562Z", "errandNumber": 461113,
"endDate": "2021-04-05T02:54:00.526Z", "startDate": "2021-03-28T13:42:59.675Z",
"handleBefore": "2021-03-29T15:27:12.367Z" "endDate": "2022-03-22T08:45:43.671Z",
"handleBefore": "2021-03-30T01:55:27.679Z"
}, },
{ {
"id": 31, "id": 31,
"firstName": "Noemie", "firstName": "Flavio",
"lastName": "Olsson", "lastName": "Gustafsson",
"service": "STOM", "status": "follow-up",
"errandNumber": 724307, "service": "KROM",
"startDate": "2021-03-28T19:36:43.720Z", "nextStep": "Gemensam planering",
"endDate": "2022-01-01T22:02:32.595Z", "errandNumber": 880356,
"handleBefore": "2021-03-29T15:54:14.762Z" "startDate": "2021-03-29T00:38:29.401Z",
"endDate": "2021-10-29T21:11:43.387Z",
"handleBefore": "2021-03-29T15:23:36.256Z"
}, },
{ {
"id": 32, "id": 32,
"firstName": "Orion", "firstName": "Prince",
"lastName": "Karlsson", "lastName": "Gustafsson",
"service": "STOM", "status": "follow-up",
"errandNumber": 769355, "service": "KVL",
"startDate": "2021-03-28T22:47:10.414Z", "nextStep": "Resultatrapport",
"endDate": "2021-12-08T11:25:16.821Z", "errandNumber": 189452,
"handleBefore": "2021-03-30T03:33:35.963Z" "startDate": "2021-03-29T07:50:55.483Z",
"endDate": "2021-09-12T04:54:24.359Z",
"handleBefore": "2021-03-30T04:25:53.482Z"
}, },
{ {
"id": 33, "id": 33,
"firstName": "Darien", "firstName": "Randy",
"lastName": "Gustafsson", "lastName": "Olsson",
"service": "KVL", "status": "follow-up",
"errandNumber": 795437, "service": "STOM",
"startDate": "2021-03-28T14:25:41.788Z", "nextStep": "Resultatrapport",
"endDate": "2021-12-06T17:25:40.528Z", "errandNumber": 421078,
"handleBefore": "2021-03-29T22:52:14.772Z" "startDate": "2021-03-28T12:24:20.382Z",
"endDate": "2021-10-23T20:54:28.032Z",
"handleBefore": "2021-03-30T09:32:48.354Z"
}, },
{ {
"id": 34, "id": 34,
"firstName": "Bailee", "firstName": "Ellen",
"lastName": "Nilsson", "lastName": "Johansson",
"service": "STOM", "status": "active",
"errandNumber": 917438, "service": "KROM",
"startDate": "2021-03-29T02:16:23.343Z", "nextStep": "Gemensam planering",
"endDate": "2021-07-13T20:37:09.622Z", "errandNumber": 616287,
"handleBefore": "2021-03-29T15:38:25.945Z" "startDate": "2021-03-29T00:23:22.494Z",
"endDate": "2021-04-05T22:26:37.595Z",
"handleBefore": "2021-03-29T11:02:05.601Z"
}, },
{ {
"id": 35, "id": 35,
"firstName": "Hulda", "firstName": "Claire",
"lastName": "Nilsson", "lastName": "Persson",
"service": "KROM", "status": "active",
"errandNumber": 283560, "service": "KVL",
"startDate": "2021-03-29T03:24:53.913Z", "nextStep": "Resultatrapport",
"endDate": "2021-04-01T09:23:16.957Z", "errandNumber": 422633,
"handleBefore": "2021-03-30T00:49:08.645Z" "startDate": "2021-03-29T02:59:06.589Z",
"endDate": "2021-11-17T02:45:29.544Z",
"handleBefore": "2021-03-29T13:46:14.423Z"
}, },
{ {
"id": 36, "id": 36,
"firstName": "Callie", "firstName": "Kallie",
"lastName": "Andersson", "lastName": "Svensson",
"status": "active",
"service": "KROM", "service": "KROM",
"errandNumber": 432061, "nextStep": "Resultatrapport",
"startDate": "2021-03-28T13:49:03.976Z", "errandNumber": 202709,
"endDate": "2021-12-04T13:55:16.348Z", "startDate": "2021-03-29T09:48:15.984Z",
"handleBefore": "2021-03-30T04:13:17.975Z" "endDate": "2021-06-16T17:19:50.055Z",
"handleBefore": "2021-03-30T02:28:17.526Z"
}, },
{ {
"id": 37, "id": 37,
"firstName": "Alejandra", "firstName": "Karine",
"lastName": "Johansson", "lastName": "Svensson",
"service": "KVL", "status": "active",
"errandNumber": 362300, "service": "STOM",
"startDate": "2021-03-28T09:03:17.100Z", "nextStep": "Resultatrapport",
"endDate": "2021-04-23T15:28:05.292Z", "errandNumber": 737191,
"handleBefore": "2021-03-29T19:41:07.119Z" "startDate": "2021-03-29T03:00:47.637Z",
"endDate": "2021-04-13T22:28:07.515Z",
"handleBefore": "2021-03-29T21:06:50.733Z"
}, },
{ {
"id": 38, "id": 38,
"firstName": "Jovanny", "firstName": "Sienna",
"lastName": "Persson", "lastName": "Persson",
"status": "active",
"service": "KROM", "service": "KROM",
"errandNumber": 886469, "nextStep": "Periodisk rapport",
"startDate": "2021-03-28T16:25:50.440Z", "errandNumber": 634191,
"endDate": "2021-10-19T13:14:28.723Z", "startDate": "2021-03-29T08:44:16.311Z",
"handleBefore": "2021-03-29T21:16:42.820Z" "endDate": "2021-08-31T23:54:22.128Z",
"handleBefore": "2021-03-29T16:19:16.981Z"
}, },
{ {
"id": 39, "id": 39,
"firstName": "Josiah", "firstName": "Ettie",
"lastName": "Eriksson", "lastName": "Svensson",
"status": "active",
"service": "STOM", "service": "STOM",
"errandNumber": 699471, "nextStep": "Slutrapport",
"startDate": "2021-03-28T18:14:02.241Z", "errandNumber": 479675,
"endDate": "2022-01-19T14:09:03.796Z", "startDate": "2021-03-29T04:59:26.463Z",
"handleBefore": "2021-03-29T13:24:02.164Z" "endDate": "2021-07-09T12:09:56.241Z",
"handleBefore": "2021-03-30T04:17:08.084Z"
}, },
{ {
"id": 40, "id": 40,
"firstName": "Demond", "firstName": "Rene",
"lastName": "Olsson", "lastName": "Larsson",
"status": "follow-up",
"service": "KVL", "service": "KVL",
"errandNumber": 758645, "nextStep": "Gemensam planering",
"startDate": "2021-03-28T11:11:49.947Z", "errandNumber": 399079,
"endDate": "2021-04-25T15:44:07.973Z", "startDate": "2021-03-28T16:00:36.629Z",
"handleBefore": "2021-03-30T05:52:23.896Z" "endDate": "2021-08-19T12:17:00.549Z",
"handleBefore": "2021-03-30T07:54:43.417Z"
}, },
{ {
"id": 41, "id": 41,
"firstName": "Rachael", "firstName": "Stanley",
"lastName": "Larsson", "lastName": "Gustafsson",
"service": "KVL", "status": "active",
"errandNumber": 213883, "service": "KROM",
"startDate": "2021-03-28T13:48:26.872Z", "nextStep": "Resultatrapport",
"endDate": "2021-08-11T14:50:26.845Z", "errandNumber": 460489,
"handleBefore": "2021-03-30T06:14:28.062Z" "startDate": "2021-03-29T00:10:06.786Z",
"endDate": "2021-11-22T16:23:50.549Z",
"handleBefore": "2021-03-29T10:48:48.680Z"
}, },
{ {
"id": 42, "id": 42,
"firstName": "Hank", "firstName": "Karina",
"lastName": "Gustafsson", "lastName": "Eriksson",
"service": "STOM", "status": "follow-up",
"errandNumber": 317122, "service": "KVL",
"startDate": "2021-03-29T02:03:12.368Z", "nextStep": "Gemensam planering",
"endDate": "2021-04-06T13:41:00.314Z", "errandNumber": 297653,
"handleBefore": "2021-03-30T06:04:08.036Z" "startDate": "2021-03-29T03:01:26.351Z",
"endDate": "2021-08-04T15:00:37.555Z",
"handleBefore": "2021-03-29T11:56:56.136Z"
}, },
{ {
"id": 43, "id": 43,
"firstName": "Jamaal", "firstName": "Lourdes",
"lastName": "Persson", "lastName": "Persson",
"service": "KROM", "status": "follow-up",
"errandNumber": 254985, "service": "KVL",
"startDate": "2021-03-28T22:09:50.067Z", "nextStep": "Periodisk rapport",
"endDate": "2021-08-14T16:06:06.014Z", "errandNumber": 272233,
"handleBefore": "2021-03-30T03:20:43.517Z" "startDate": "2021-03-28T22:04:02.907Z",
"endDate": "2021-04-06T16:04:16.710Z",
"handleBefore": "2021-03-29T15:06:08.991Z"
}, },
{ {
"id": 44, "id": 44,
"firstName": "Lulu", "firstName": "Erika",
"lastName": "Andersson", "lastName": "Karlsson",
"service": "KVL", "status": "follow-up",
"errandNumber": 698835, "service": "STOM",
"startDate": "2021-03-29T05:26:47.608Z", "nextStep": "Periodisk rapport",
"endDate": "2021-08-07T06:49:21.202Z", "errandNumber": 849218,
"handleBefore": "2021-03-30T04:42:36.097Z" "startDate": "2021-03-28T11:53:16.705Z",
"endDate": "2021-12-09T12:56:44.095Z",
"handleBefore": "2021-03-29T19:22:04.005Z"
}, },
{ {
"id": 45, "id": 45,
"firstName": "Brianne", "firstName": "Zack",
"lastName": "Nilsson", "lastName": "Gustafsson",
"service": "KROM", "status": "follow-up",
"errandNumber": 410723, "service": "STOM",
"startDate": "2021-03-28T23:58:34.372Z", "nextStep": "Gemensam planering",
"endDate": "2021-09-18T19:31:33.334Z", "errandNumber": 394107,
"handleBefore": "2021-03-29T16:21:08.880Z" "startDate": "2021-03-29T01:08:46.446Z",
"endDate": "2021-07-25T10:10:18.432Z",
"handleBefore": "2021-03-30T05:36:56.244Z"
}, },
{ {
"id": 46, "id": 46,
"firstName": "Rhoda", "firstName": "Angela",
"lastName": "Gustafsson", "lastName": "Johansson",
"service": "STOM", "status": "active",
"errandNumber": 249730, "service": "KROM",
"startDate": "2021-03-28T09:56:22.796Z", "nextStep": "Slutrapport",
"endDate": "2021-11-08T09:52:39.151Z", "errandNumber": 902417,
"handleBefore": "2021-03-30T03:57:05.253Z" "startDate": "2021-03-29T08:22:01.343Z",
"endDate": "2021-05-18T06:51:13.878Z",
"handleBefore": "2021-03-29T13:24:07.969Z"
}, },
{ {
"id": 47, "id": 47,
"firstName": "Irwin", "firstName": "Dulce",
"lastName": "Eriksson", "lastName": "Gustafsson",
"service": "STOM", "status": "follow-up",
"errandNumber": 395606, "service": "KVL",
"startDate": "2021-03-28T10:58:36.254Z", "nextStep": "Periodisk rapport",
"endDate": "2021-09-26T01:53:29.905Z", "errandNumber": 818091,
"handleBefore": "2021-03-30T07:13:37.504Z" "startDate": "2021-03-29T09:44:42.579Z",
"endDate": "2021-11-13T22:04:43.592Z",
"handleBefore": "2021-03-30T08:37:47.748Z"
}, },
{ {
"id": 48, "id": 48,
"firstName": "Candido", "firstName": "Jamey",
"lastName": "Larsson", "lastName": "Karlsson",
"service": "KROM", "status": "active",
"errandNumber": 805048, "service": "KVL",
"startDate": "2021-03-29T03:00:50.863Z", "nextStep": "Gemensam planering",
"endDate": "2021-06-08T23:53:39.404Z", "errandNumber": 256779,
"handleBefore": "2021-03-29T20:01:49.405Z" "startDate": "2021-03-28T14:38:02.750Z",
"endDate": "2021-08-26T21:34:35.782Z",
"handleBefore": "2021-03-29T23:28:08.749Z"
}, },
{ {
"id": 49, "id": 49,
"firstName": "Tyshawn", "firstName": "Abbie",
"lastName": "Karlsson", "lastName": "Svensson",
"service": "STOM", "status": "follow-up",
"errandNumber": 220243, "service": "KROM",
"startDate": "2021-03-28T17:38:49.230Z", "nextStep": "Slutrapport",
"endDate": "2021-05-01T21:05:19.336Z", "errandNumber": 500853,
"handleBefore": "2021-03-29T23:20:30.570Z" "startDate": "2021-03-28T14:59:29.959Z",
"endDate": "2021-06-06T22:39:38.631Z",
"handleBefore": "2021-03-29T11:46:53.501Z"
}, },
{ {
"id": 50, "id": 50,
"firstName": "Gudrun", "firstName": "Johnpaul",
"lastName": "Eriksson", "lastName": "Eriksson",
"status": "active",
"service": "STOM", "service": "STOM",
"errandNumber": 227839, "nextStep": "Gemensam planering",
"startDate": "2021-03-28T23:01:57.736Z", "errandNumber": 392201,
"endDate": "2021-07-19T04:13:07.539Z", "startDate": "2021-03-28T22:49:34.281Z",
"handleBefore": "2021-03-29T23:36:23.397Z" "endDate": "2021-05-17T19:40:32.940Z",
"handleBefore": "2021-03-30T03:14:57.259Z"
} }
] ]
} }

View File

@@ -4,7 +4,7 @@
"description": "A mock api implementing all needed endpoints for dafa-web", "description": "A mock api implementing all needed endpoints for dafa-web",
"scripts": { "scripts": {
"generate-api": "node ./scripts/generate-api.js", "generate-api": "node ./scripts/generate-api.js",
"start": "npm run generate-api && json-server --watch api.json --port 8000" "start": "npm run generate-api && json-server --watch api.json --port 8000 --routes routes.json"
}, },
"author": "Erik Tiekstra (erik.tiekstra@arbetsformedlingen.se)", "author": "Erik Tiekstra (erik.tiekstra@arbetsformedlingen.se)",
"license": "MIT", "license": "MIT",

View File

@@ -0,0 +1,6 @@
{
"/api/*": "/$1",
"/participant/:id": "/participants/:id",
"/activeParticipants": "/participants?status=active",
"/followUpParticipants": "/participants?status=follow-up"
}

View File

@@ -3,6 +3,8 @@ import faker from 'faker';
faker.locale = 'sv'; faker.locale = 'sv';
const AVAILABLE_SERVICES = ['KROM', 'STOM', 'KVL']; const AVAILABLE_SERVICES = ['KROM', 'STOM', 'KVL'];
const STATUSES = ['active', 'follow-up'];
const STEPS = ['Gemensam planering', 'Periodisk rapport', 'Resultatrapport', 'Slutrapport'];
function generateParticipants(amount = 10) { function generateParticipants(amount = 10) {
const participants = []; const participants = [];
@@ -12,7 +14,9 @@ function generateParticipants(amount = 10) {
id, id,
firstName: faker.name.firstName(), firstName: faker.name.firstName(),
lastName: faker.name.lastName(), lastName: faker.name.lastName(),
status: STATUSES[Math.floor(Math.random() * STATUSES.length)],
service: AVAILABLE_SERVICES[Math.floor(Math.random() * AVAILABLE_SERVICES.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 }), errandNumber: faker.random.number({ min: 100000, max: 999999 }),
startDate: faker.date.recent(), startDate: faker.date.recent(),
endDate: faker.date.future(), endDate: faker.date.future(),