Add complete task functionality (#71)

closes #61
closes #58

Reviewed-on: #71
This commit was merged in pull request #71.
This commit is contained in:
2025-05-19 09:07:51 +02:00
parent f04529067a
commit 5bcbde46ea
4 changed files with 30 additions and 10 deletions

View File

@@ -28,9 +28,11 @@ export class TasksPage implements ViewWillEnter {
}
getTasks() {
this.taskService.getTaskList().subscribe(tasks => {
this.tasks$.next(tasks);
});
setTimeout(() => {
this.taskService.getTaskList().subscribe(tasks => {
this.tasks$.next(tasks);
});
}, 1)
}
createTask() {
@@ -40,4 +42,9 @@ export class TasksPage implements ViewWillEnter {
updateTask(id: number) {
this.router.navigate(['edit', id], { relativeTo: this.route });
}
completeTask(id: number) {
this.taskService.completeTask(id);
this.getTasks();
}
}