Commit 295be894417fb7d265c5e2d28c3d65c2822ef4a4

Authored by Marcelo Puebla
Exists in master

Merge branch 'master' into 'master'

Master(mpuebla)

See merge request !107
src/app/components/comanda/comanda.component.html
1   -<div class="container-fluid fade-in p-0">
  1 +<div class="container-fluid d-flex flex-column h-100 fade-in pb-4 pr-2">
2 2  
3   - <div class="row z-index-0 fixed-top m-0 w-100">
4   - <div class="col-12 p-3">
5   - <img class="w-15 float-right" src="../../../assets/img/debo-gray.png">
6   - </div>
  3 + <div class="row z-index-0 fixed-top m-0 w-100">
  4 + <div class="col-12 p-3">
  5 + <img class="w-15 float-right" src="../../../assets/img/debo-gray.png">
7 6 </div>
  7 + </div>
8 8  
9   - <div class="row pt-5 m-2">
  9 + <div class="row pt-5 m-3">
10 10 <div class="col-12">
11 11 <p class="m-0 h2 text-center">Pedidos a elaborar</p>
12 12 </div>
13 13 </div>
14 14  
15   - <div class="card-columns m-1 fade-in disable-user-select">
16   - <div
17   - *ngFor="let comanda of comandas"
18   - class="card fade-in rounded-xs shadow-sm"
19   - [ngClass]="{
20   - 'bg-light': comanda.estado === 1,
21   - 'bg-danger': comanda.estado === 2,
22   - 'bg-success swing-out-top-bck': comanda.estado === 3
23   - }">
24   - <div class="card-body p-2">
25   - <p class="h1 card-title text-center mb-1">{{comanda.id.toString().slice(comanda.id.toString().length - 2)}}</p>
26   - <!-- TODO: Implementar moment -->
27   - <p class="card-title text-center mb-1">{{comanda.fechafinelaboracion | date: 'dd-MM-yyyy HH:mm' : '+0000'}}</p>
28   - <p
29   - *ngFor="let detalle of comanda.detalles"
30   - [ngClass]="
31   - {
32   - 'border-secondary': comanda.estado === 1,
33   - 'border-light': comanda.estado != 1
34   - }"
35   - class="card-text border-top pt-2 mb-2">
36   - <small>
37   - {{detalle.articulo.DET_LAR}}
38   - </small><br>
39   - <small>
40   - CANT. {{detalle.cantidad}}
41   - </small>
42   - </p>
43   - <button
44   - *ngIf="comanda.estado === 1"
45   - class="btn btn-block btn-danger shadow-sm"
46   - (click)="updateComanda(comanda, 2, 'En elaboracion')">
47   - Elaborar
48   - </button>
49   - <button
50   - *ngIf="comanda.estado === 2"
51   - class="btn btn-block btn-success shadow-sm"
52   - (click)="updateComanda(comanda, 3, 'Terminado')">
53   - Terminar
54   - </button>
55   - <button
56   - *ngIf="comanda.estado === 2"
57   - class="btn btn-block btn-light btn-sm shadow-sm p-0"
58   - (click)="updateComanda(comanda, 1, 'Pagado')">
59   - <span class="pr-2 h6"><small>Deshacer</small></span>
60   - <i class="fa fa-undo text-warning" aria-hidden="true"></i>
61   - </button>
  15 + <div class="row flex-fill m-0 overflow-scroll">
  16 + <div class="col-12 px-2">
  17 + <div class="card-columns h-100 m-1 fade-in disable-user-select">
  18 + <div *ngFor="let comanda of comandas" class="card fade-in rounded-xs shadow-sm" [ngClass]="{
  19 + 'bg-light': comanda.estado === 1,
  20 + 'bg-danger': comanda.estado === 2,
  21 + 'bg-success swing-out-top-bck': comanda.estado === 3
  22 + }">
  23 + <div class="card-body p-2">
  24 + <p class="h1 card-title text-center mb-1">{{comanda.id.toString().slice(comanda.id.toString().length - 2)}}
  25 + </p>
  26 + <!-- TODO: Implementar moment -->
  27 + <p class="card-title text-center mb-1">{{comanda.fechafinelaboracion | date: 'dd-MM-yyyy HH:mm' : '+0000'}}
  28 + </p>
  29 + <p *ngFor="let detalle of comanda.detalles" [ngClass]="
  30 + {
  31 + 'border-secondary': comanda.estado === 1,
  32 + 'border-light': comanda.estado != 1
  33 + }" class="card-text border-top pt-2 mb-2">
  34 + <small>
  35 + {{detalle.articulo.DET_LAR}}
  36 + </small><br>
  37 + <small>
  38 + CANT. {{detalle.cantidad}}
  39 + </small>
  40 + </p>
  41 + <button *ngIf="comanda.estado === 1" class="btn btn-block btn-danger shadow-sm"
  42 + (click)="updateComanda(comanda, 2, 'En elaboracion')">
  43 + Elaborar
  44 + </button>
  45 + <button *ngIf="comanda.estado === 2" class="btn btn-block btn-success shadow-sm"
  46 + (click)="updateComanda(comanda, 3, 'Terminado')">
  47 + Terminar
  48 + </button>
  49 + <button *ngIf="comanda.estado === 2" class="btn btn-block btn-light btn-sm shadow-sm p-0"
  50 + (click)="updateComanda(comanda, 1, 'Pagado')">
  51 + <span class="pr-2 h6"><small>Deshacer</small></span>
  52 + <i class="fa fa-undo text-warning" aria-hidden="true"></i>
  53 + </button>
  54 + </div>
  55 + </div>
62 56 </div>
63 57 </div>
64 58 </div>
  59 +
65 60 </div>