Add saving the bucket position after dragging it
This commit is contained in:
parent
110873c780
commit
410225a5fa
|
@ -501,7 +501,17 @@ export default {
|
|||
},
|
||||
updateBucketPosition(e) {
|
||||
this.dragBucket = false
|
||||
console.log('drop bucket', e)
|
||||
|
||||
const bucket = this.buckets[e.newIndex]
|
||||
const bucketBefore = this.buckets[e.newIndex - 1] ?? null
|
||||
const bucketAfter = this.buckets[e.newIndex + 1] ?? null
|
||||
|
||||
bucket.position = calculateItemPosition(bucketBefore !== null ? bucketBefore.position : null, bucketAfter !== null ? bucketAfter.position : null)
|
||||
|
||||
this.$store.dispatch('kanban/updateBucket', bucket)
|
||||
.catch(e => {
|
||||
this.error(e)
|
||||
})
|
||||
},
|
||||
setBucketLimit(bucket) {
|
||||
if (bucket.limit < 0) {
|
||||
|
|
Reference in New Issue