ticket-detail.component.html 866 Bytes
Newer Older
Endika ESTEBAN's avatar
Endika ESTEBAN committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<ng-container *ngIf="ticket$ | async as ticket; else loading">
    <a [routerLink]="['/tickets']">Back</a>

    <h1>{{ ticket.id }}</h1>
    <p>{{ ticket.status }}</p>
    <h2>Assigned user</h2>
    
    <user [id]="ticket.assigneeId"></user>

    <form [formGroup]="editUserForm">
        <div>
            <input type="checkbox" formControlName="completed" />
            <label for="completed">Completed</label>
        </div>
        <div>
            <input type="checkbox" formControlName="edit" />
            <label for="edit">Edit assigned user</label>
        </div>
        <div>
            <select formControlName="user">
                <option *ngFor="let user of (users$ | async)" [ngValue]="user.id">{{user.name}}</option>
            </select>
        </div>
    </form>
</ng-container>

<ng-template #loading>
    <p>Loading...</p>
</ng-template>