<div class="row">
    <div class="form-group col-md-6">
        <label for="taskUserId">User ID</label>
        
        <div class="input-group">
            <input
                [(ngModel)]="userId" class="form-control" id="taskUserId"
                type="text"
            >
            <span class="input-group-btn">
                <button
                    (click)="update()" class="btn btn-default"
                >Update</button>
            </span>
        </div>
    </div>
</div>

<h1 *ngIf="tasks.length === 0">There are no tasks.</h1>

<table *ngIf="tasks.length !== 0" class="table table-striped">
    <thead>
    <tr>
        <td>Date</td>
        <td>Title</td>
        <td>Description</td>
    </tr>
    </thead>
    <tbody>
    <tr (click)="taskClicked(task)" *ngFor="let task of tasks">
        <td>{{task.dateTime}}</td>
        <td>{{task.title}}</td>
        <td>{{task.description}}</td>
    </tr>
    </tbody>
</table>
