fix(kanban): reset loading state after creating a task

Resolves: https://kolaente.dev/vikunja/frontend/issues/2184
This commit is contained in:
kolaente 2022-07-21 15:57:03 +02:00
parent 4c560f1a03
commit cb3f269937
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -291,7 +291,7 @@ export default {
listId, listId,
position, position,
}) { }) {
setLoading({commit}, 'tasks') const cancel = setLoading({commit}, 'tasks')
const parsedTask = parseTaskText(title, getQuickAddMagicMode()) const parsedTask = parseTaskText(title, getQuickAddMagicMode())
const foundListId = await dispatch('findListId', { const foundListId = await dispatch('findListId', {
@ -321,10 +321,12 @@ export default {
const taskService = new TaskService() const taskService = new TaskService()
const createdTask = await taskService.create(task) const createdTask = await taskService.create(task)
return dispatch('addLabelsToTask', { const result = await dispatch('addLabelsToTask', {
task: createdTask, task: createdTask,
parsedLabels: parsedTask.labels, parsedLabels: parsedTask.labels,
}) })
cancel()
return result
}, },
}, },
} }