diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php
index c9801bbb5..797db3ed9 100644
--- a/application/controllers/Cis/Profil.php
+++ b/application/controllers/Cis/Profil.php
@@ -19,6 +19,7 @@ class Profil extends Auth_Controller
'index' => ['student/anrechnung_beantragen:r', 'user:r'], // TODO(chris): permissions?
'foto_sperre_function' => ['student/anrechnung_beantragen:r', 'user:r'],
'getView' => ['student/anrechnung_beantragen:r', 'user:r'],
+ 'View' => ['student/anrechnung_beantragen:r', 'user:r'],
'insertProfilRequest' => ['student/anrechnung_beantragen:r', 'user:r'],
'updateProfilRequest' => ['student/anrechnung_beantragen:r', 'user:r'],
'deleteProfilRequest' => ['student/anrechnung_beantragen:r', 'user:r'],
@@ -99,11 +100,14 @@ class Profil extends Auth_Controller
//? loops over all updateRequests from a user to validate if the new request is valid
$res = $this->ProfilChangeModel->loadWhere(["uid"=>$this->uid]);
$res = hasData($res) ? getData($res) : null;
+
if($res){
foreach($res as $update_request){
$existing_change = json_decode($update_request->requested_change);
-
- if(isset($existing_change->$type) && $existing_change->$type == $payload->$type){
+ echo json_encode($existing_change);
+ echo property_exists($existing_change,$type);
+
+ if(property_exists($existing_change,$type) && $existing_change->$type == $payload->$type){
//? the kontakt_id / adresse_id of a change has to be unique
echo json_encode(error("cannot change the same resource twice"));
@@ -267,6 +271,7 @@ class Profil extends Auth_Controller
}
+ print_r($telefon_res);
$res = new stdClass();
$res->username = $uid;
@@ -303,7 +308,7 @@ class Profil extends Auth_Controller
//? Mailverteiler Info
$res->mailverteiler = $mailverteiler_res;
- $res->standort_telefon = $telefon_res->kontakt;
+ $res->standort_telefon = isset($telefon_res)? $telefon_res->kontakt : null;
return $res;
diff --git a/public/js/components/Cis/Profil/EditProfil.js b/public/js/components/Cis/Profil/EditProfil.js
index 10bcea898..316d6966f 100644
--- a/public/js/components/Cis/Profil/EditProfil.js
+++ b/public/js/components/Cis/Profil/EditProfil.js
@@ -68,6 +68,7 @@ export default {
//? if the topic was passed through the prop add it to the component
this.topic = this.editData.topic;
}
+ console.log("here",this.editData);
},
diff --git a/public/js/components/Cis/Profil/EditProfilSelect.js b/public/js/components/Cis/Profil/EditProfilSelect.js
index e721b6f11..a5869eb75 100644
--- a/public/js/components/Cis/Profil/EditProfilSelect.js
+++ b/public/js/components/Cis/Profil/EditProfilSelect.js
@@ -2,6 +2,7 @@ import Kontakt from "./ProfilComponents/Kontakt.js";
import EditKontakt from "./ProfilComponents/EditKontakt.js";
import Adresse from "./ProfilComponents/Adresse.js";
import EditAdresse from "./ProfilComponents/EditAdresse.js";
+import Status from "./ProfilComponents/Status.js";
export default {
components: {
@@ -9,6 +10,7 @@ export default {
EditKontakt,
Adresse,
EditAdresse,
+ Status,
},
props: {
@@ -173,7 +175,7 @@ export default {
-
+
+
+
+
diff --git a/public/js/components/Cis/Profil/ProfilComponents/Status.js b/public/js/components/Cis/Profil/ProfilComponents/Status.js
new file mode 100644
index 000000000..bc69497bd
--- /dev/null
+++ b/public/js/components/Cis/Profil/ProfilComponents/Status.js
@@ -0,0 +1,35 @@
+export default {
+
+ data(){
+ return {
+
+ }
+ },
+ props:{
+ data:{type:Object},
+ view:{type:String},
+ status:{type:String},
+ status_message:{type:String},
+ status_timestamp:{type:String},
+ update:{type:Boolean},
+ },
+ created(){
+
+
+ },template:`
+