diff --git a/api/src/Controller/DefaultController.php b/api/src/Controller/DefaultController.php index 73a4f7c..e1a0232 100644 --- a/api/src/Controller/DefaultController.php +++ b/api/src/Controller/DefaultController.php @@ -532,8 +532,14 @@ public function viewAction(Session $session, $slug = false, $resource = false, S return $this->redirect($this->generateUrl('app_default_slug', ['requestType' => 'http://vtc.zaakonline.nl/request_types/5b10c1d6-7121-4be2-b479-7523f1b625f1'])); break; case 'new-request': - $variables['requestTypes'] = $commonGroundService->getResourceList('https://vtc.zaakonline.nl/request_types', ['submitter' => $variables['user']['burgerservicenummer']])["hydra:member"]; + $variables['requestTypes'] = $commonGroundService->getResourceList('https://vtc.zaakonline.nl/request_types')["hydra:member"]; break; + case 'switch-organisation': + $variables['organisations'] = $commonGroundService->getResourceList('http://wrc.zaakonline.nl/organizations')["hydra:member"]; + break; + case 'switch-application': + $variables['applications'] = $commonGroundService->getResourceList('http://wrc.zaakonline.nl/applications')["hydra:member"]; + break; } if ($template = $sjabloonService->getOnSlug($slug)) { diff --git a/api/src/Service/ApplicationService.php b/api/src/Service/ApplicationService.php index 2567ade..f418885 100644 --- a/api/src/Service/ApplicationService.php +++ b/api/src/Service/ApplicationService.php @@ -61,22 +61,28 @@ public function getVariables() // @todo iets met organisaties en applicaties $organization= $this->request->get('organization'); if($organization|| $organization= $this->request->query->get('organization')){ + $organization= $this->commonGroundService->getResource($organization); $this->session->set('organization', $organization); } - else{ + // lets default + elseif(!$this->session->get('organization') ){ /*@todo param bag interface */ - $this->session->set('organization', '000000'); + $organization= $this->commonGroundService->getResource('http://wrc.zaakonline.nl/organizations/8366b635-2c76-4007-a782-048f8797e766'); + $this->session->set('organization', $organization); } $variables['organization'] = $this->session->get('organization'); // application $application= $this->request->get('application'); if($application|| $application= $this->request->query->get('application')){ + $application= $this->commonGroundService->getResource($application); $this->session->set('application', $application); } - else{ + // lets default + elseif(!$this->session->get('application')){ /*@todo param bag interface */ - $this->session->set('application', '0000000'); + $application= $this->commonGroundService->getResource('http://wrc.zaakonline.nl/applications/536bfb73-63a5-4719-b535-d835607b88b2'); + $this->session->set('application', $application); } $variables['application'] = $this->session->get('application');