mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Needs to have another logic to remove item from list if remove or if confirmed was successful.
This commit is contained in:
parent
67a9f2d0e0
commit
51333155c9
@ -237,7 +237,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
this.$emit('remove-confirm-result', item, 'remove')
|
||||
this.$emit('remove-confirm-result', item, 'confirmed')
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toasted.error(error.message)
|
||||
|
||||
@ -51,9 +51,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
removeConfirmResult(e, event) {
|
||||
let index = 0
|
||||
const findArr = this.confirmResult.find((arr) => arr.id === e.id)
|
||||
if (event === 'remove') {
|
||||
let index = 0
|
||||
const findArr = this.confirmResult.find((arr) => arr.id === e.id)
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: deletePendingCreation,
|
||||
@ -70,6 +70,10 @@ export default {
|
||||
.catch((error) => {
|
||||
this.$toasted.error(error.message)
|
||||
})
|
||||
} else {
|
||||
this.confirmResult.splice(index, 1)
|
||||
this.$store.commit('openCreationsMinus', 1)
|
||||
this.$toasted.success('Pending Creation has been deleted')
|
||||
}
|
||||
},
|
||||
getPendingCreations() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user