diff --git a/src/app/tasks/new-task/new-task.component.html b/src/app/tasks/new-task/new-task.component.html index 8d5e25c..57dc8af 100644 --- a/src/app/tasks/new-task/new-task.component.html +++ b/src/app/tasks/new-task/new-task.component.html @@ -1,4 +1,4 @@ -
+

Add Task

@@ -18,7 +18,7 @@

- +

diff --git a/src/app/tasks/new-task/new-task.component.ts b/src/app/tasks/new-task/new-task.component.ts index 1f80875..326a5d5 100644 --- a/src/app/tasks/new-task/new-task.component.ts +++ b/src/app/tasks/new-task/new-task.component.ts @@ -1,5 +1,4 @@ -import {Component, EventEmitter, Input, Output} from '@angular/core'; -import {Task} from '../../task/task.model'; +import {Component, EventEmitter, Output} from '@angular/core'; @Component({ selector: 'app-new-task', @@ -8,9 +7,9 @@ import {Task} from '../../task/task.model'; styleUrl: './new-task.component.css' }) export class NewTaskComponent { - @Output() close = new EventEmitter(); + @Output() cancel = new EventEmitter(); - onCloseTask() { - this.close.emit(); + onCancel() { + this.cancel.emit(); } } diff --git a/src/app/tasks/tasks.component.html b/src/app/tasks/tasks.component.html index 23b2525..8f67f7e 100644 --- a/src/app/tasks/tasks.component.html +++ b/src/app/tasks/tasks.component.html @@ -1,5 +1,5 @@ @if (isAddingTask) { - + }
diff --git a/src/app/tasks/tasks.component.ts b/src/app/tasks/tasks.component.ts index 44afdc6..7c7c3f6 100644 --- a/src/app/tasks/tasks.component.ts +++ b/src/app/tasks/tasks.component.ts @@ -43,15 +43,15 @@ export class TasksComponent { return this.tasks.filter((task) => task.userId === this.user.id); } + onCompleteTask(taskId: string) { + this.tasks = this.tasks.filter((task) => task.id !== taskId); + } + onStartAddTask() { this.isAddingTask = true; } - onStopAddTask() { + onCancelAddTask() { this.isAddingTask = false; } - - onCompleteTask(taskId: string) { - this.tasks = this.tasks.filter((task) => task.id !== taskId); - } }