From 72e8a23cc0cb95282e8e9fc631aba7180a444c4a Mon Sep 17 00:00:00 2001 From: Kelani Tolulope Date: Fri, 16 Jun 2023 21:22:58 +0100 Subject: [PATCH] fix application configuration to submit only data from the form of each card --- .../src/views/System/Application/Editor.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/client/web/admin/src/views/System/Application/Editor.vue b/client/web/admin/src/views/System/Application/Editor.vue index b70f8040c..f961150f8 100644 --- a/client/web/admin/src/views/System/Application/Editor.vue +++ b/client/web/admin/src/views/System/Application/Editor.vue @@ -181,9 +181,17 @@ export default { this.info.processing = true if (this.applicationID) { + application = { + ...application, + unify: this.initialApplicationState.unify, + } + this.$SystemAPI.applicationUpdate(application) .then(() => { - this.fetchApplication() + this.initialApplicationState = new system.Application({ + ...application, + unify: this.initialApplicationState.unify, + }) this.animateSuccess('info') this.toastSuccess(this.$t('notification:application.update.success')) @@ -237,10 +245,15 @@ export default { .catch(() => {}) } - return this.$SystemAPI.applicationUpdate({ ...this.application, unify }) + return this.$SystemAPI.applicationUpdate({ ...this.initialApplicationState, unify }) .then(() => { + this.application = new system.Application({ ...this.application, unify }) + this.initialApplicationState = new system.Application({ + ...this.initialApplicationState, + unify, + }) + this.unifyAssetStateChange = false - this.fetchApplication() this.toastSuccess(this.$t('notification:application.update.success')) })