mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
when an error happenes to editProfil Modal will also be closed then
This commit is contained in:
@@ -160,7 +160,7 @@ class ProfilUpdate extends FHCAPI_Controller
|
||||
$res = $this->getDataOrTerminateWithError($res);
|
||||
|
||||
//? the user cannot delete a zustelladresse/kontakt
|
||||
if (isset($payload["delete"]) && $payload-[$identifier == "kontakt_id" ? "zustellung" : "zustelladresse"]) {
|
||||
if (isset($payload["delete"]) && $payload[$identifier == "kontakt_id" ? "zustellung" : "zustelladresse"]) {
|
||||
$this->terminateWithError($this->p->t('profilUpdate', 'profilUpdate_deleteZustellung_error'));
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,10 @@ export default {
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
this.loading = false;
|
||||
this.setLoading(false);
|
||||
this.result = false;
|
||||
this.hide();
|
||||
})
|
||||
: this.$fhcApi.factory.profilUpdate.insertProfilRequest(
|
||||
this.topic,
|
||||
@@ -115,6 +119,10 @@ export default {
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
this.loading = false;
|
||||
this.setLoading(false);
|
||||
this.result = false;
|
||||
this.hide();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -94,10 +94,10 @@ export default {
|
||||
item.data.delete = true;
|
||||
this.$emit("update:profilUpdate", item.data);
|
||||
//? updates the topic when a Kontakt or an Address should be deleted
|
||||
this.topic = this.profilUpdateTopic["Private Adressen"]
|
||||
this.modal_topic = this.profilUpdateTopic["Private Adressen"]
|
||||
? this.profilUpdateTopic["Delete Adresse"]
|
||||
: this.profilUpdateTopic["Delete Kontakt"];
|
||||
this.$emit("update:topic", this.topic);
|
||||
this.$emit("update:topic", this.modal_topic);
|
||||
|
||||
this.$emit("submit");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user