Skip to content

Commit

Permalink
fix: add basic data on deceased persons
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Mar 6, 2024
1 parent b7d7aaf commit 1950012
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions frontend/app/source/php/Controller/Sok.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ public function actionSok(array $req) {
Sanitize::number($req->pnr)
);



//Get data
$person = $this->searchPerson(
$this->data['searchFor']
Expand All @@ -96,6 +94,8 @@ public function actionSok(array $req) {
$this->data['searchFor']
);

$this->data['basicData'] = [];

if($this->isDeregistered($person)) {

//Create deregistration state
Expand All @@ -104,6 +104,12 @@ public function actionSok(array $req) {
$person->deregistrationReason
);

$this->data['basicData'] = $this->createBasicDataList(
$person,
Format::socialSecuriyNumber($req->pnr),
$this->getCivilStatus($this->data['searchFor'])
);

} else {

//Is not deregistered
Expand Down Expand Up @@ -284,7 +290,7 @@ private function createBasicDataList($data, $pnr, $civilStatus) {
]],
['columns' => [
'Civilstatus:',
$civilStatus['description'] ? $civilStatus['description'] . Format::addPharanthesis($civilStatus['date']) : ''
$civilStatus['description'] ? $civilStatus['description'] . " " . Format::addPharanthesis($civilStatus['date']) : ''
]],
['columns' => [
'Förnamn:',
Expand Down

0 comments on commit 1950012

Please sign in to comment.