todo-app-angular/src/app/tasks/tasks.component.html
Maxime Delporte 73de5fedfe
All checks were successful
Deploying Website / build (push) Successful in 1m3s
Using dependency injection inside new-task.component.
2025-04-22 07:14:12 -03:00

31 lines
578 B
HTML

@if (isAddingTask) {
<app-new-task
[userId]="user.id"
(close)="onCloseAddTask()"
/>
}
<section id="tasks">
<header>
<h2>{{ user.name }}'s Tasks</h2>
<menu>
<button (click)="onStartAddTask()">Add Task</button>
</menu>
</header>
@if (selectedUserTasks) {
<ul>
@for (task of selectedUserTasks; track task.id) {
<li>
<app-task
[task]="task"
(complete)="onCompleteTask($event)"
/>
</li>
}
</ul>
} @else {
<p>Create a new task for his user.</p>
}
</section>