/
organisation-waiters.component.html
56 lines (53 loc) · 1.94 KB
/
organisation-waiters.component.html
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<div fxLayout="row break" fxLayoutAlign="space-between center">
<h1>"{{ selectedOrganisation?.name }}" {{ 'HOME_WAITERS_NAV_ORGANISATION' | tr }}</h1>
<a routerLink="../create" class="btn btn-outline-success">
<i-bs name="plus-circle"></i-bs>
{{ 'ADD_2' | tr }}</a
>
</div>
<div class="spinner-row" *ngIf="!entitiesLoaded">
<div class="spinner-border" role="status">
<span class="visually-hidden">{{ 'LOADING' | tr }}</span>
</div>
</div>
<form class="mt-2" [hidden]="!entitiesLoaded">
<div class="input-group">
<input class="form-control ml-2 bg-dark text-white" type="text" [formControl]="filter" placeholder="{{ 'SEARCH' | tr }}" />
<button
class="btn btn-outline-secondary"
type="button"
ngbTooltip="{{ 'CLEAR' | tr }}"
placement="bottom"
(click)="filter.reset()"
*ngIf="filter?.value?.length > 0">
<i-bs name="x-circle-fill"></i-bs>
</button>
</div>
</form>
<div class="table-responsive" [hidden]="!entitiesLoaded">
<table class="table table-dark table-hover">
<thead>
<tr class="table-dark">
<th sortable="name" (sort)="onSort($event)" style="min-width: 20vh">{{ 'NAME' | tr }}</th>
<th style="min-width: 20vh">{{ 'ACTIONS' | tr }}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let waiter of entitiesCopy" class="table-dark clickable" (click)="openQRCode(waiter)">
<td>{{ waiter.name }}</td>
<td (click)="$event.stopPropagation()">
<a class="btn btn-sm m-1 btn-outline-success text-white" routerLink="../{{ waiter.id }}" ngbTooltip="{{ 'EDIT' | tr }}">
<i-bs name="pencil-square"></i-bs>
</a>
<button
type="button"
class="btn btn-sm m-1 btn-outline-danger text-white"
ngbTooltip="{{ 'DELETE' | tr }}"
(click)="onDelete(waiter.id)">
<i-bs name="trash"></i-bs>
</button>
</td>
</tr>
</tbody>
</table>
</div>