mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
more compact code
This commit is contained in:
parent
eb2d2a0d3d
commit
8af325d3d0
@ -36,8 +36,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.pendingCreations = this.pendingCreations.filter((obj) => obj.id !== item.id)
|
||||
this.$store.commit('openCreationsMinus', 1)
|
||||
this.updatePendingCreations(item.id)
|
||||
this.$toasted.success(this.$t('creation_form.toasted_delete'))
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -53,8 +52,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
this.pendingCreations = this.pendingCreations.filter((obj) => obj.id !== item.id)
|
||||
this.$store.commit('openCreationsMinus', 1)
|
||||
this.updatePendingCreations(item.id)
|
||||
this.$toasted.success(this.$t('creation_form.toasted_created'))
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -76,6 +74,10 @@ export default {
|
||||
this.$toasted.error(error.message)
|
||||
})
|
||||
},
|
||||
updatePendingCreations(id) {
|
||||
this.pendingCreations = this.pendingCreations.filter((obj) => obj.id !== id)
|
||||
this.$store.commit('openCreationsMinus', 1)
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
fields() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user