diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Kontakt/Address.js b/public/js/components/Stv/Studentenverwaltung/Details/Kontakt/Address.js index 7e4cbc3db..c6bd07be4 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Kontakt/Address.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Kontakt/Address.js @@ -205,8 +205,15 @@ export default{ if(this.addressData.adresse_id) if(this.addressData.heimatadresse) this.$fhcAlert.alertError(this.$p.t('person', 'error_deleteHomeAdress')); - else - this.$refs.deleteAdressModal.show(); + else { + this.$fhcAlert + .confirmDelete() + .then(result => result + ? adress_id + : Promise.reject({handled: true})) + .then(this.deleteAddress) + .catch(this.$fhcAlert.handleSystemError); + } }); }, addNewAddress(addressData) { @@ -254,7 +261,6 @@ export default{ }).catch(this.$fhcAlert.handleSystemError) .finally(()=> { window.scrollTo(0, 0); - this.hideModal('deleteAdressModal'); this.reload(); }); }, @@ -559,18 +565,6 @@ export default{ - - - - - - - { - if(this.bankverbindungData.bankverbindung_id) - this.$refs.deleteBankverbindungModal.show(); + this.$fhcAlert + .confirmDelete() + .then(result => result + ? bankverbindung_id + : Promise.reject({handled: true})) + .then(this.deleteBankverbindung) + .catch(this.$fhcAlert.handleSystemError); }); }, addNewBankverbindung(bankverbindungData) { @@ -188,7 +193,6 @@ export default{ }).catch(this.$fhcAlert.handleSystemError) .finally(()=> { window.scrollTo(0, 0); - this.hideModal('deleteBankverbindungModal'); this.resetModal(); this.reload(); }); @@ -315,230 +319,7 @@ export default{ - - - - - - - - - - - - - result + ? contact_id + : Promise.reject({handled: true})) + .then(this.deleteContact) + .catch(this.$fhcAlert.handleSystemError); }, addNewContact(formData) { this.$fhcApi.post('api/frontend/v1/stv/kontakt/addNewContact/' + this.uid, @@ -181,7 +188,6 @@ export default{ .catch(this.$fhcAlert.handleSystemError) .finally(()=> { window.scrollTo(0, 0); - this.hideModal('deleteContactModal'); this.resetModal(); this.reload(); }); @@ -378,19 +384,7 @@ export default{ - - - - - - - - + { if(this.statusData) - this.$refs.deleteStatusModal.show(); + { + this.$fhcAlert + .confirmDelete() + .then(result => result + ? this.statusId + : Promise.reject({handled: true})) + .then(this.deleteStatus) + .catch(this.$fhcAlert.handleSystemError); + } }); + }, actionAdvanceStatus(status, stdsem, ausbildungssemester){ this.statusId = { @@ -355,7 +364,6 @@ export default{ }); }, actionConfirmDialogue(data, statusgrund, statusText){ - // this.hideModal('addMultiStatus'); this.actionButton = statusgrund; this.actionStatusText = statusText; @@ -426,8 +434,6 @@ export default{ }; this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData, ausbildungssemester: this.actionSem})); - - console.log("in changeStatusToWiederholer" + prestudentIds); this.addNewStatus(prestudentIds); }, changeStatusToDiplomand(prestudentIds){ @@ -440,9 +446,6 @@ export default{ }; this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData})); - -/* console.log("in changeStatusToDiplomand" + prestudentIds); - this.hideModal('addMultiStatus');*/ this.addNewStatus(prestudentIds); }, changeStatusToAbsolvent(prestudentIds){ @@ -455,9 +458,6 @@ export default{ }; this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData})); - -/* console.log("in changeStatusToAbsolvent" + prestudentIds); - this.hideModal('addMultiStatus');*/ this.addNewStatus(prestudentIds); }, turnIntoStudent(prestudentIds){ @@ -502,7 +502,6 @@ export default{ else { console.log(prestudentId + ": isersterStudent: " + this.isErsterStudent + " Add New Status"); - changeData = this.newArray.find(item => item.prestudent_id === prestudentId); return this.$fhcApi.post('api/frontend/v1/stv/status/addNewStatus/' + prestudentId, @@ -537,7 +536,6 @@ export default{ /* if (this.modelValue.prestudent_id) { this.reload(); //TODO(manu) reload Detailtab after Abbrecher to see current status activ, verband and gruppe - //TODO(manu) reload Tab STatus after turned Into Student to see new status }*/ if(this.isErsterStudent) { this.reload(); @@ -652,7 +650,6 @@ export default{ .then( result => { this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); - this.hideModal('deleteStatusModal'); this.resetModal(); }) .catch(this.$fhcAlert.handleSystemError) @@ -924,24 +921,7 @@ export default{ - - - - - - - - +