diff --git a/api/src/Controller/DashboardController.php b/api/src/Controller/DashboardController.php index 845fdd80..ad191451 100644 --- a/api/src/Controller/DashboardController.php +++ b/api/src/Controller/DashboardController.php @@ -85,7 +85,17 @@ public function notificationsAction(Session $session, Request $request, CommonGr public function claimsAction(Session $session, Request $request, CommonGroundService $commonGroundService, ApplicationService $applicationService, ParameterBagInterface $params, string $slug = 'home') { $variables = []; - $variables['claims'] = $commonGroundService->getResourceList('https://dev.zuid-drecht.nl/api/v1/wac/claims')['hydra:member']; //['component' => 'wac', 'type' => 'claims'], ['person' => $this->getUser()->getPerson(), 'order[dateCreated]' => 'desc'] + $variables['claims'] = $commonGroundService->getResourceList(['component' => 'wac', 'type' => 'claims'], ['person' => $this->getUser()->getPerson(), 'order[dateCreated]' => 'desc'])['hydra:member']; + + if ($request->isMethod('POST')) { + $resource = $request->request->all(); + + $resource['person'] = $this->getUser()->getPerson(); + + $commonGroundService->saveResource($resource, (['component' => 'wac', 'type' => 'claims'])); + + return $this->redirect($this->generateUrl('app_dashboard_claims')); + } return $variables; } @@ -97,7 +107,7 @@ public function claimsAction(Session $session, Request $request, CommonGroundSer public function contractsAction(Session $session, Request $request, CommonGroundService $commonGroundService, ApplicationService $applicationService, ParameterBagInterface $params, string $slug = 'home') { $variables = []; - $variables['contracts'] = $commonGroundService->getResourceList('https://dev.zuid-drecht.nl/api/v1/wac/contracts')['hydra:member']; //['component' => 'wac', 'type' => 'contracts'], ['person' => $this->getUser()->getPerson(), 'order[dateCreated]' => 'desc'] + $variables['contracts'] = $commonGroundService->getResourceList(['component' => 'wac', 'type' => 'contracts'], ['person' => $this->getUser()->getPerson(), 'order[dateCreated]' => 'desc'])['hydra:member']; return $variables; } diff --git a/api/templates/dashboard/claims.html.twig b/api/templates/dashboard/claims.html.twig index cb26d6c5..5451f8d7 100644 --- a/api/templates/dashboard/claims.html.twig +++ b/api/templates/dashboard/claims.html.twig @@ -65,7 +65,7 @@ -
+
@@ -73,6 +73,23 @@
+ +
+ + + + +
{% if claim.proofs is defined and claim.proofs is not empty %} @@ -139,5 +156,5 @@ - {% include 'dashboard/modals/claim_modal.html.twig' %} + {% include 'dashboard/modals/add_claim_modal.html.twig' %} {% endblock %} diff --git a/api/templates/dashboard/modals/add_claim_modal.html.twig b/api/templates/dashboard/modals/add_claim_modal.html.twig new file mode 100644 index 00000000..c91c0ecb --- /dev/null +++ b/api/templates/dashboard/modals/add_claim_modal.html.twig @@ -0,0 +1,101 @@ + + + + diff --git a/api/templates/dashboard/modals/claim_modal.html.twig b/api/templates/dashboard/modals/claim_modal.html.twig deleted file mode 100644 index d7ba15a6..00000000 --- a/api/templates/dashboard/modals/claim_modal.html.twig +++ /dev/null @@ -1,63 +0,0 @@ - - diff --git a/api/translations/messages.nl.xlf b/api/translations/messages.nl.xlf index 836283c5..99c1d628 100644 --- a/api/translations/messages.nl.xlf +++ b/api/translations/messages.nl.xlf @@ -135,13 +135,53 @@ no claims available - __no claims available + geen claims beschikbaar - + + add data + gegevens toevoegen + + + load data + gegevens inladen + + + retrieve data + gegevens ophalen + + + delete data + gegevens verwijderen + + + Where do you want to retrieve your data from? + Waar wilt u uw gegevens van ophalen? + + + add data + gegevens toevoegen + + + What data do you want to add manually? + Welke gegevens wilt u handmatig toevoegen? + + + add manually + handmatig toevoegen + + contracts contracten - + + view contracts + contracten bekijken + + + view dossier + dossier bekijken + + no contracts available geen contracten beschikbaar @@ -193,7 +233,11 @@ view usage gebruik inzien - + + view usage + gebruik bekijken + + end contract contract beëindigen @@ -1523,7 +1567,7 @@ checkins - __checkins + checkins privacy @@ -1663,11 +1707,11 @@ no organizations - __no organizations + geen organisaties development - __development + ontwikkeling free