1
0

fix(tasks): sort done tasks last in relations

When adding a new task relation, the task search input would previously show all tasks in a seemingly random order, including done tasks. Usually, you don't care about these done tasks when adding relations. This change modifies the sort order so that done tasks show up last in the search results.
This commit is contained in:
kolaente
2024-02-12 22:00:33 +01:00
parent 71e62541a1
commit 8d5cb335bd

View File

@ -261,7 +261,10 @@ const foundTasks = ref<ITask[]>([])
async function findTasks(newQuery: string) {
query.value = newQuery
foundTasks.value = await taskService.getAll({}, {s: newQuery})
foundTasks.value = await taskService.getAll({}, {
s: newQuery,
sort_by: 'done',
})
}
function mapRelatedTasks(tasks: ITask[]) {