fixes ProfilUpdate bugs

This commit is contained in:
SimonGschnell
2024-09-13 12:37:13 +02:00
parent cf1cb44afa
commit 88c38c9228
3 changed files with 9 additions and 29 deletions
@@ -68,14 +68,12 @@ export default {
: "denyProfilRequest"
](this.data)
.then((res) => {
this.setLoading(false);
this.loading = false;
this.result = true;
})
.catch((e) => {
Alert.popup(Vue.h("div", { innerHTML: e.response.data }));
})
.catch((e) => this.$fhcAlert.handleSystemError)
.finally(() => {
this.setLoading(false);
this.loading = false;
this.hide();
});
},
@@ -135,9 +135,7 @@ export default {
.then((res) => {
this.$refs.UpdatesTable.tabulator.setData();
})
.catch((e) => {
Alert.popup(Vue.h("div", { innerHTML: e.response.data }));
});
.catch((e) => this.$fhcAlert.handleSystemError);
},
},
{
@@ -153,9 +151,7 @@ export default {
.then((res) => {
this.$refs.UpdatesTable.tabulator.setData();
})
.catch((e) => {
Alert.popup(Vue.h("div", { innerHTML: e.response.data }));
});
.catch((e) => this.$fhcAlert.handleSystemError);
},
},
{
@@ -308,9 +304,7 @@ export default {
.then((res) => {
// block when the request was successful
})
.catch((e) => {
Alert.popup(Vue.h("div", { innerHTML: e.response.data }));
})
.catch((e) => this.$fhcAlert.handleSystemError)
.finally(() => {
this.$refs.UpdatesTable.tabulator.setData();
});
@@ -320,9 +314,7 @@ export default {
.then((res) => {
// block when the request was successful
})
.catch((e) => {
Alert.popup(Vue.h("div", { innerHTML: e.response.data }));
})
.catch((e) => this.$fhcAlert.handleSystemError)
.finally(() => {
// update the data inside the table
this.$refs.UpdatesTable.tabulator.setData();
+2 -12
View File
@@ -81,12 +81,7 @@ export default {
.then(res => {
this.activeAmpeln = res.data;
})
.catch(error => {
if (error.code === 'ECONNABORTED')
this.fetchNonConfirmedActiveAmpeln();
else
this.$fhcAlert.handleSystemError(error);
});
.catch(error => this.$fhcAlert.handleSystemError);
},
fetchAllActiveAmpeln() {
this.$fhcApi.factory
@@ -94,12 +89,7 @@ export default {
.then(res => {
this.allAmpeln = res.data;
})
.catch(error => {
if (error.code === 'ECONNABORTED')
this.fetchAllActiveAmpeln();
else
this.$fhcAlert.handleSystemError(error);
});
.catch(error => this.$fhcAlert.handleSystemError);
},
async confirm(ampelId) {