feat(employee): Matched models to the API and adjusted mock-api. (TV-346)

Squashed commit of the following:

commit 0f10a7864960cae47694212042f9d58053b05a0c
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Wed Aug 18 14:13:15 2021 +0200

    Changed tjanst and utforandeVerksamhet to plural

commit 3ffe861d8721692d0b49b0f333f2f52186b23560
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Wed Aug 18 12:26:43 2021 +0200

    Updated fetching single employee in mock-api

commit ae101885a90367b86b77faadaa171816aa2ffcaa
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Wed Aug 18 12:23:28 2021 +0200

    Changed models for employees and fixed mock-api
This commit is contained in:
Erik Tiekstra
2021-08-18 14:16:17 +02:00
parent b7c7b6b6b0
commit 5bb81c3bd4
9 changed files with 158 additions and 115 deletions

View File

@@ -9,13 +9,15 @@ server.use(middlewares);
server.use(
jsonServer.rewriter({
'/api/*': '/$1',
'*sort=services*': '$1sort=services[0].name$2',
'*sort=organizations*': '$1sort=organizations[0].address.city$2',
'*sort=utforandeVerksamhet*': '$1sort=utforandeverksamhet$2',
'*sort=tjanst*': '$1sort=tjansteNamn$2',
'/employee*search=*': '/employee$1fullName_like=$2',
'/employee*onlyEmployeesWithoutAuthorization=*': '/employee$1authorizations.length_gte=1',
'/employee*': '/employees$1',
'*sort=fullName*': '$1sort=name$2',
'*sort=utforandeVerksamheter*': '$1sort=utforandeVerksamhet[0]$2',
'*sort=tjanster*': '$1sort=tjanst[0]$2',
'/users/:id': '/employees?ciamUserId=:id',
'/users*': '/employees$1',
'/employees*search=*': '/employees$1fullName_like=$2',
'/employees*onlyEmployeesWithoutAuthorization=*': '/employees$1authorizations.length_gte=1',
'/employees/invite': '/invites',
'/employees*': '/employees$1',
'/participants': '/participants?_embed=employees',
'/participant/:id': '/participants/:id?_embed=employees',
'/auth/userinfo': '/currentUser',