fix application configuration to submit only data from the form of each card

This commit is contained in:
Kelani Tolulope
2023-06-23 12:00:47 +01:00
parent 68460a85f9
commit 72e8a23cc0
@@ -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'))
})