1
0

fix(kanban): move task to done bucket when it was marked done from the task detail view

This commit is contained in:
kolaente
2024-07-17 13:56:43 +02:00
parent 3566b889be
commit ed5feee33a
3 changed files with 22 additions and 6 deletions

View File

@ -137,6 +137,12 @@ export const useKanbanStore = defineStore('kanban', () => {
}
}
}
function moveTaskToBucket(task: ITask, bucketId: IBucket['id']) {
removeTaskInBucket(task)
task.bucketId = bucketId
addTaskToBucket(task)
}
function addTaskToBucket(task: ITask) {
const bucketIndex = findIndexById(buckets.value, task.bucketId)
@ -330,6 +336,7 @@ export const useKanbanStore = defineStore('kanban', () => {
setTaskInBucket,
addTaskToBucket,
removeTaskInBucket,
moveTaskToBucket,
loadBucketsForProject,
loadNextTasksForBucket,
createBucket,