<div class="row">
    <div class="form-group col-md-6">
        <label for="activityUserId">User ID</label>

        <div class="input-group">
            <input
                [(ngModel)]="userId"
                class="form-control"
                id="activityUserId"
                type="text"
            />

            <span class="input-group-btn">
                <button (click)="update()" class="btn btn-default">
                    Update
                </button>
            </span>
        </div>
    </div>
</div>

<h1 *ngIf="activities.length === 0">There are no activity items.</h1>

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