fix: createNewTask typing
This commit is contained in:
parent
106abfc842
commit
f9b51306c3
1 changed files with 4 additions and 4 deletions
|
@ -320,7 +320,7 @@ const tasksStore : Module<TaskState, RootStoreState>= {
|
||||||
return foundListId
|
return foundListId
|
||||||
},
|
},
|
||||||
|
|
||||||
async createNewTask({dispatch, commit}, {
|
async createNewTask(ctx, {
|
||||||
title,
|
title,
|
||||||
bucketId,
|
bucketId,
|
||||||
listId,
|
listId,
|
||||||
|
@ -328,10 +328,10 @@ const tasksStore : Module<TaskState, RootStoreState>= {
|
||||||
} :
|
} :
|
||||||
Partial<ITask>,
|
Partial<ITask>,
|
||||||
) {
|
) {
|
||||||
const cancel = setLoading({commit}, 'tasks')
|
const cancel = setLoading(ctx, 'tasks')
|
||||||
const parsedTask = parseTaskText(title, getQuickAddMagicMode())
|
const parsedTask = parseTaskText(title, getQuickAddMagicMode())
|
||||||
|
|
||||||
const foundListId = await dispatch('findListId', {
|
const foundListId = await ctx.dispatch('findListId', {
|
||||||
list: parsedTask.list,
|
list: parsedTask.list,
|
||||||
listId: listId || 0,
|
listId: listId || 0,
|
||||||
})
|
})
|
||||||
|
@ -358,7 +358,7 @@ const tasksStore : Module<TaskState, RootStoreState>= {
|
||||||
|
|
||||||
const taskService = new TaskService()
|
const taskService = new TaskService()
|
||||||
const createdTask = await taskService.create(task)
|
const createdTask = await taskService.create(task)
|
||||||
const result = await dispatch('addLabelsToTask', {
|
const result = await ctx.dispatch('addLabelsToTask', {
|
||||||
task: createdTask,
|
task: createdTask,
|
||||||
parsedLabels: parsedTask.labels,
|
parsedLabels: parsedTask.labels,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue