fix: sort completed subtasks to bottom (#12) #13

Closed
maximus wants to merge 1 commit from fix/simpl-liste-12-subtasks-completed-last into master
2 changed files with 2 additions and 2 deletions

View file

@ -105,7 +105,7 @@ export async function getSubtasks(parentId: string) {
.select()
.from(tasks)
.where(eq(tasks.parentId, parentId))
.orderBy(asc(tasks.position));
.orderBy(asc(tasks.completed), asc(tasks.position));
}
export async function getTaskById(id: string) {

View file

@ -117,7 +117,7 @@ export async function syncWidgetData(): Promise<void> {
.select({ id: tasks.id, title: tasks.title, completed: tasks.completed })
.from(tasks)
.where(eq(tasks.parentId, task.id))
.orderBy(asc(tasks.position));
.orderBy(asc(tasks.completed), asc(tasks.position));
task.subtasks = subs;
}
}