From a2d71d3a8dcd7500516c25fc79a20ba3b0410df4 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Tue, 2 Apr 2024 16:38:29 +0200 Subject: [PATCH] adjusts how the AcceptDenyModal is used and included in the ProfilUpdateView --- .../Cis/Profil/ProfilModal/EditProfil.js | 6 ++- .../Cis/ProfilUpdate/AcceptDenyUpdate.js | 6 ++- .../Cis/ProfilUpdate/ProfilUpdateView.js | 47 +++++++++++++++---- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/public/js/components/Cis/Profil/ProfilModal/EditProfil.js b/public/js/components/Cis/Profil/ProfilModal/EditProfil.js index 6ef7ccef8..39705baa0 100755 --- a/public/js/components/Cis/Profil/ProfilModal/EditProfil.js +++ b/public/js/components/Cis/Profil/ProfilModal/EditProfil.js @@ -101,6 +101,8 @@ export default { this.fileID? this.fileID[0]: null ).then((res) => { handleApiResponse(res); + }).catch((err) => { + console.error(err); }) : Vue.$fhcapi.ProfilUpdate.insertProfilRequest( this.topic, @@ -109,7 +111,9 @@ export default { ).then((res) => { handleApiResponse(res); - }); + }).catch((err) => { + console.error(err); + }) } }, diff --git a/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js b/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js index ed13eae03..f09aa8edd 100755 --- a/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js +++ b/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js @@ -61,8 +61,10 @@ export default { this.result = true; }).catch((e) => { Alert.popup(Vue.h('div',{innerHTML:e.response.data})); + }).finally(()=>{ + this.hide(); }); - this.hide(); + }, denyRequest: async function () { @@ -105,7 +107,7 @@ export default { }, template: ` - +