Fix rearranging tasks in a kanban bucket when its limit was reached
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2021-09-07 18:38:53 +02:00
parent 28a4b1c533
commit 332dbc1598
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 1 deletions

View File

@ -130,7 +130,7 @@
<div :ref="`tasks-container${bucket.id}`" class="tasks">
<draggable
v-model="bucket.tasks"
@start="() => drag = true"
@start="() => dragstart(bucket)"
@end="updateTaskPosition"
:group="{name: 'tasks', put: shouldAcceptDrop(bucket) && !dragBucket}"
v-bind="dragOptions"
@ -542,6 +542,10 @@ export default {
bucket.limit === 0 || // If there is no limit set, dragging & dropping should always work
bucket.tasks.length < bucket.limit // Disallow dropping to buckets which have their limit reached
},
dragstart(bucket) {
this.drag = true
this.sourceBucket = bucket.id
},
toggleDoneBucket(bucket) {
bucket.isDoneBucket = !bucket.isDoneBucket
this.$store.dispatch('kanban/updateBucket', bucket)