Enable dropping only when limits are okay

This commit is contained in:
kolaente 2021-07-28 17:44:00 +02:00
parent 44fb6c11e9
commit 41449a6b15
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 2 deletions

View File

@ -108,13 +108,13 @@
</dropdown>
</div>
<div :ref="`tasks-container${bucket.id}`" class="tasks">
{{ drag }}
<draggable
v-model="bucket.tasks"
@start="() => drag = true"
@end="e => onDrop(bucket.id, e)"
group="buckets"
:group="{name: 'buckets', put: shouldAcceptDrop(bucket)}"
v-bind="dragOptions"
:disabled="!canWrite"
>
<transition-group type="transition" :name="!drag ? 'move-card': null">
<!-- Make the component either a div or a draggable component based on the user rights -->
@ -267,6 +267,7 @@ export default {
dragOptions: {
animation: 150,
ghostClass: 'ghost',
dragClass: 'task-dragging',
},
sourceBucket: 0,