diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php index 4221e3837..c4d97b2fd 100644 --- a/application/controllers/Cis/Profil.php +++ b/application/controllers/Cis/Profil.php @@ -25,6 +25,7 @@ class Profil extends Auth_Controller $this->load->model('ressource/student_model', 'StudentModel'); $this->load->model('person/Benutzer_model', 'BenutzerModel'); $this->load->model('person/Person_model', 'PersonModel'); + $this->load->model('person/Adresse_model', 'AdresseModel'); } @@ -61,7 +62,16 @@ class Profil extends Auth_Controller public function getPersonInformation($pid){ //? get the person information using the benutzer uid - echo json_encode($this->PersonModel->getPersonStammdaten($pid)->retval); + $json_result = $this->PersonModel->getPersonStammdaten($pid)->retval; + + + //! the following line is not needed because it is already included in the getPersonStammdaten function + //$json_result->addresse_info = $this->AdresseModel->getZustellAdresse($pid)->retval; + echo json_encode($json_result); + return; + + + } //? check wheter the parameter uid is a Mitarbeiter or a Student diff --git a/public/js/components/Cis/Profil/Profil.js b/public/js/components/Cis/Profil/Profil.js index f00f6a85e..7f953b150 100644 --- a/public/js/components/Cis/Profil/Profil.js +++ b/public/js/components/Cis/Profil/Profil.js @@ -24,6 +24,15 @@ export default { nachname:this.person_info.nachname, gebdatum:this.person_info.gebdatum, gebort:this.person_info.gebort, + adresse:this.person_info.adressen[0].strasse + " " + this.person_info.adressen[0].plz, + + }; + }, + cis_profil_info_no_foto(){ + return { + ...this.person_info, + foto:null, + }; } }, @@ -39,12 +48,18 @@ export default {
{{"here is the uid "+uid}}
{{"here is the pid "+pid}}
-{{JSON.stringify(cis_profil_info)}}
-
+
+ {{JSON.stringify(cis_profil_info,null,2)}}
+ {{JSON.stringify(cis_profil_info_no_foto,null,2)}}
+
{{JSON.stringify(person)}}
+ {{JSON.stringify(person)}}
{{JSON.stringify(role)}}
+ {{JSON.stringify(role)}}
`,
};
\ No newline at end of file