diff --git a/application/controllers/Cis/ProfilUpdate.php b/application/controllers/Cis/ProfilUpdate.php index 9672892fa..b2c2d3c1b 100755 --- a/application/controllers/Cis/ProfilUpdate.php +++ b/application/controllers/Cis/ProfilUpdate.php @@ -178,7 +178,6 @@ class ProfilUpdate extends Auth_Controller return json_encode(error("Error loading DmsVersion resource")); } $attachment = hasData($attachment) ? getData($attachment) : null; - //? returns {name:..., dms_id:...} echo json_encode($attachment); } @@ -353,11 +352,11 @@ class ProfilUpdate extends Auth_Controller } private function updateRequestedChange($id, $requested_change){ - return $this->update([$id], ['requested_change'=>json_encode($requested_change)]); + return $this->ProfilUpdateModel->update([$id], ['requested_change'=>json_encode($requested_change)]); } private function setStatusOnUpdateRequest($id, $status, $status_message ){ - return $this->update([$id], ["status"=>$status,"status_timestamp"=>"NOW()","status_message"=>$status_message]); + return $this->ProfilUpdateModel->update([$id], ["status"=>$status,"status_timestamp"=>"NOW()","status_message"=>$status_message]); } diff --git a/application/models/person/Profil_update_model.php b/application/models/person/Profil_update_model.php index 5bdbc3c32..f9aa59c1c 100755 --- a/application/models/person/Profil_update_model.php +++ b/application/models/person/Profil_update_model.php @@ -84,7 +84,9 @@ class Profil_update_model extends DB_Model //? Nur wenn der/die AssistentIn auch die Berechtigung in der gleichen Organisationseinheit des Studenten hat $parameters = []; $query=" - SELECT * FROM public.tbl_profil_update + SELECT + profil_update_id, uid, name, topic, requested_change, tbl_profil_update.updateamum, tbl_profil_update.updatevon, tbl_profil_update.insertamum, tbl_profil_update.insertvon, status, status_timestamp, status_message, attachment_id + FROM public.tbl_profil_update JOIN public.tbl_student ON public.tbl_student.student_uid=public.tbl_profil_update.uid JOIN public.tbl_prestudent ON public.tbl_prestudent.prestudent_id=public.tbl_student.prestudent_id JOIN public.tbl_studiengang ON public.tbl_studiengang.studiengang_kz=public.tbl_prestudent.studiengang_kz @@ -107,7 +109,7 @@ class Profil_update_model extends DB_Model } } if($mitarbeiterBerechtigung) { - + $this->addSelect(["profil_update_id", "uid", "name", "topic", "requested_change", "tbl_profil_update.updateamum", "tbl_profil_update.updatevon", "tbl_profil_update.insertamum", "tbl_profil_update.insertvon", "status", "status_timestamp", "status_message", "attachment_id"]); $this->addJoin('tbl_mitarbeiter','tbl_mitarbeiter.mitarbeiter_uid=tbl_profil_update.uid'); $mitarbeiterRequests = $this->loadWhere($whereClause); if(isError($mitarbeiterRequests)) return error("db error: ". getData($mitarbeiterRequests)); diff --git a/public/js/apps/Cis/ProfilUpdateRequests.js b/public/js/apps/Cis/ProfilUpdateRequests.js index 7982c8519..411ac425b 100755 --- a/public/js/apps/Cis/ProfilUpdateRequests.js +++ b/public/js/apps/Cis/ProfilUpdateRequests.js @@ -88,7 +88,6 @@ const app = Vue.createApp({ action: (e, column) => { Vue.$fhcapi.ProfilUpdate.acceptProfilRequest(column.getData()) .then((res) => { - console.log("here"); this.$refs.UpdatesTable.tabulator.setData(); }) .catch((e) => { diff --git a/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js b/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js index 59ee70255..b249d8120 100755 --- a/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js +++ b/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js @@ -131,7 +131,7 @@ export default { {{item.topic}} {{item.status}} - {{item.change_timestamp}} + {{item.status_timestamp}} diff --git a/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js b/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js index 12b1d7d32..fbc0ee0c7 100755 --- a/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js +++ b/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js @@ -37,6 +37,7 @@ export default { //? result is returned from the Promise when the modal is closed result: false, info: null, + files:null, }; }, @@ -78,7 +79,12 @@ export default { } }, }, - created() {}, + created() { + + Vue.$fhcapi.ProfilUpdate.getProfilRequestFiles(this.data.profil_update_id).then((res) =>{ + this.files=res.data; + }) + }, mounted() { this.modal = this.$refs.modalContainer.modal; }, @@ -170,9 +176,9 @@ export default { {{data.requested_change.value}} -
- - {{file.name}} +
+ + {{file.name}}