Fix bucket deletion
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2021-03-10 11:40:40 +01:00
parent c1dc8c9864
commit 2582cebb97
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 3 additions and 7 deletions

View File

@ -22,8 +22,6 @@ export default {
text: err,
actions: actions,
})
context.loading = false
},
success(e, context, actions = []) {
// Build the notification text from error response
@ -41,7 +39,5 @@ export default {
actions: actions,
},
})
context.loading = false
},
}

View File

@ -236,7 +236,7 @@ export default {
cancel()
})
},
deleteBucket(ctx, bucket) {
deleteBucket(ctx, {bucket, params}) {
const cancel = setLoading(ctx, 'kanban')
const bucketService = new BucketService()
@ -244,7 +244,7 @@ export default {
.then(r => {
ctx.commit('removeBucket', bucket)
// We reload all buckets because tasks are being moved from the deleted bucket
ctx.dispatch('loadBucketsForList', {listId: bucket.listId})
ctx.dispatch('loadBucketsForList', {listId: bucket.listId, params: params})
return Promise.resolve(r)
})
.catch(e => {

View File

@ -537,7 +537,7 @@ export default {
listId: this.$route.params.listId,
})
this.$store.dispatch('kanban/deleteBucket', bucket)
this.$store.dispatch('kanban/deleteBucket', {bucket: bucket, params: this.params})
.then(() => {
this.success({message: 'The bucket has been deleted successfully.'}, this)
})