From 8ebdedea6b240b5de5115a950ce5aec6cf6a76a6 Mon Sep 17 00:00:00 2001 From: imelilabourne Date: Fri, 18 Sep 2020 14:10:43 +0800 Subject: [PATCH] checkbox alignment --- db.json | 10 ++-------- .../containers/TodoList/todo-list.component.css | 4 ---- .../containers/TodoList/todo-list.component.html | 4 ++-- .../containers/TodoList/todo-list.component.ts | 8 +++++--- src/app/Todo-List-App/services/todo.service.ts | 5 +++++ 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/db.json b/db.json index adc9d0b..080b02d 100644 --- a/db.json +++ b/db.json @@ -1,16 +1,10 @@ { "tasks": [ { - "title": "30 secs side plank", + "title": "ty po sa milktea hahaha", "completed": false, "editing": false, - "id": 4 - }, - { - "title": "sleep", - "completed": false, - "editing": false, - "id": 5 + "id": 2 } ] } \ No newline at end of file diff --git a/src/app/Todo-List-App/containers/TodoList/todo-list.component.css b/src/app/Todo-List-App/containers/TodoList/todo-list.component.css index bd99c58..7a6af18 100644 --- a/src/app/Todo-List-App/containers/TodoList/todo-list.component.css +++ b/src/app/Todo-List-App/containers/TodoList/todo-list.component.css @@ -86,10 +86,6 @@ li{ margin-top: -30px; } -input[type="checkbox"]{ - margin: 0 10px; -} - .dateClass{ font-size: 1em; float: right; diff --git a/src/app/Todo-List-App/containers/TodoList/todo-list.component.html b/src/app/Todo-List-App/containers/TodoList/todo-list.component.html index bf962b4..2770c60 100644 --- a/src/app/Todo-List-App/containers/TodoList/todo-list.component.html +++ b/src/app/Todo-List-App/containers/TodoList/todo-list.component.html @@ -4,7 +4,7 @@

TODO LIST

-
Select All
+
@@ -43,7 +43,7 @@
{{ remaining()}} uncompleted tasks
- +
You've selected an item
diff --git a/src/app/Todo-List-App/containers/TodoList/todo-list.component.ts b/src/app/Todo-List-App/containers/TodoList/todo-list.component.ts index db13486..47f104b 100644 --- a/src/app/Todo-List-App/containers/TodoList/todo-list.component.ts +++ b/src/app/Todo-List-App/containers/TodoList/todo-list.component.ts @@ -122,10 +122,12 @@ export class TodoList{ clearCompleted(tasks: Tasks){ - this.tasks = this.tasks.filter(task => !task.completed); + // this.tasks = this.tasks.filter(task => !task.completed); - this.todoService.deleteTask(tasks) - .subscribe(data => this.tasks.filter(task => !task.completed)) + // this.todoService.deleteAllTask(tasks) + // .subscribe(data => this.tasks.filter(task => { + // return task.completed !== data; + // })) } selectAll():void{ diff --git a/src/app/Todo-List-App/services/todo.service.ts b/src/app/Todo-List-App/services/todo.service.ts index e44d5c7..89aa2bd 100644 --- a/src/app/Todo-List-App/services/todo.service.ts +++ b/src/app/Todo-List-App/services/todo.service.ts @@ -30,5 +30,10 @@ export class TodoService{ return this.http.delete(URL + '/' + task.id); } + deleteAllTask(task: Tasks){ + return this.http.delete(URL + '/' + task.id); + } + + } \ No newline at end of file