Skip to content

Commit

Permalink
feat(ZMS-1808): remove requests from redirected appointment
Browse files Browse the repository at this point in the history
  • Loading branch information
manjencic committed Jan 19, 2024
1 parent 6a130f8 commit cbf70e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 0 additions & 6 deletions zmsadmin/src/Zmsadmin/WorkstationProcessRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ public function readResponse(
['resolveReferences' => 2]
)->getEntity();

$process = \App::$http
->readGetResult(
'/process/'. $process->getId() .'/'. $process->getAuthKey() .'/',
['resolveReferences' => 2]
)->getEntity();

$newProcess = clone $process;
$newProcess->scope = $scope;
$newProcess->appointments[0]->scope = $scope;
Expand Down
8 changes: 2 additions & 6 deletions zmsapi/src/Zmsapi/ProcessRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use \BO\Zmsdb\Process as Query;
use \BO\Zmsdb\ProcessStatusQueued;
use BO\Zmsdb\Workstation;
use BO\Zmsentities\Collection\RequestList;

/**
* @SuppressWarnings(Coupling)
Expand All @@ -31,13 +32,8 @@ public function readResponse(
$input = Validator::input()->isJson()->assertValid()->getValue();
$entity = new \BO\Zmsentities\Process($input);
$newProcess = new \BO\Zmsentities\Process($input);



$process = $this->readValidProcess($workstation, $entity, $input);
$process = (new Process())->readEntity($process->id, $process->authKey, 2);
$requests = $process->getRequests();
$newProcess->requests = $requests;
$newProcess->requests = new RequestList();

$this->testProcessAccess($workstation, $process);

Expand Down
4 changes: 4 additions & 0 deletions zmsdb/src/Zmsdb/Query/ProcessStatusArchived.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ public function postProcess($data)

private function getArchivedServices(\BO\Zmsentities\Process $process)
{
if ($process->getRequests()->count() === 0) {
return '';
}

$services = $process->getRequests()->getFirst()->name;

if ($process->getRequests()->count() > 1) {
Expand Down

0 comments on commit cbf70e5

Please sign in to comment.