comanda.component.html
1.7 KB
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
<div class="container-fluid fade-in p-0">
<div class="row m-2">
<div class="col-12">
<p class="m-0 h2 text-center">Pedidos a elaborar</p>
</div>
</div>
<div class="card-columns m-1 fade-in disable-user-select">
<div
*ngFor="let comanda of comandas"
class="card fade-in rounded-xs shadow-sm"
[ngClass]="{
'bg-light': comanda.estado === 1,
'bg-danger': comanda.estado === 2,
'bg-success swing-out-top-bck': comanda.estado === 3
}">
<div class="card-body p-2">
<p class="h5 card-title text-center mb-1">{{comanda.id}}.</p>
<p
*ngFor="let detalle of comanda.detalles"
[ngClass]="
{
'border-secondary': comanda.estado === 1,
'border-light': comanda.estado != 1
}"
class="card-text border-top pt-2 mb-2">
<small>
{{detalle.articulo.DET_LAR}}
</small>
</p>
<button
*ngIf="comanda.estado === 1"
class="btn btn-block btn-danger shadow-sm"
(click)="updateComanda(comanda, 2, 'En elaboracion')">
Elaborar
</button>
<button
*ngIf="comanda.estado === 2"
class="btn btn-block btn-success shadow-sm"
(click)="updateComanda(comanda, 3, 'Terminado')">
Terminado
</button>
<button
*ngIf="comanda.estado === 2"
class="btn btn-block btn-light btn-sm shadow-sm p-0"
(click)="updateComanda(comanda, 1, 'Pagado')">
<span class="pr-1 h6"><small>En espera</small></span>
<i class="fa fa-undo text-warning" aria-hidden="true"></i>
</button>
</div>
</div>
</div>
</div>