diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php index 20fb65e22..b9e0b6f36 100644 --- a/application/controllers/Cis/Profil.php +++ b/application/controllers/Cis/Profil.php @@ -72,8 +72,7 @@ class Profil extends Auth_Controller $_GET = json_decode($this->input->raw_input_stream, true); $uid = $this->input->get('uid'); $id = $this->input->get('id'); - echo $uid; - echo $id; + if($uid && $id){ $res= $this->ProfilChangeModel->getProfilUpdate($uid, $id); diff --git a/application/models/person/Profil_change_model.php b/application/models/person/Profil_change_model.php index b8c487a5a..0877b4bcc 100644 --- a/application/models/person/Profil_change_model.php +++ b/application/models/person/Profil_change_model.php @@ -46,10 +46,11 @@ class Profil_change_model extends DB_Model // catch error }else{ if(hasData($res)){ + foreach($res->retval as $update){ $update->requested_change = json_decode($update->requested_change); - $update->change_timestamp = date_create($update->change_timestamp)->format('d.m.Y'); - $update->status_timestamp = date_create($update->status_timestamp)->format('d.m.Y'); + $update->change_timestamp = !is_null($update->change_timestamp)?date_create($update->change_timestamp)->format('d.m.Y'):null; + $update->status_timestamp = !is_null($update->status_timestamp)?date_create($update->status_timestamp)->format('d.m.Y'):null; } } } diff --git a/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js b/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js index 284cea8c7..ce446bbdc 100644 --- a/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js +++ b/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js @@ -133,15 +133,15 @@ export default {
Date of Status:
- - {{data.status_timestamp}} + + {{data.status_timestamp?data.status_timestamp:'-'}}
Status message:
- + {{data.status_message? data.status_message : '-'}}