Commit 64226e7eedb23dd672c3e4e51054883d843223e6

Authored by Marcelo Puebla
Exists in master and in 1 other branch validar_pve

Merge branch 'master' into 'master'

Master(mpuebla)

See merge request !119
src/app/components/comanda/comanda.component.html
... ... @@ -21,7 +21,7 @@
21 21 'bg-success swing-out-top-bck': comanda.estado === 3
22 22 }">
23 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)}}
  24 + <p class="h1 card-title text-center mb-1">{{rellenar(comanda.id.toString().slice(comanda.id.toString().length - 3), 3)}}
25 25 </p>
26 26 <!-- TODO: Implementar moment -->
27 27 <p class="card-title text-center mb-1">{{comanda.fechafinelaboracion | date: 'dd-MM-yyyy HH:mm' : '+0000'}}
src/app/components/comanda/comanda.component.ts
... ... @@ -41,7 +41,6 @@ export class ComandaComponent implements OnInit {
41 41 if (!_.isEqual(res, this.comandas)) {
42 42  
43 43 this.comandas = res;
44   - console.log(this.comandas);
45 44 }
46 45 }, e => console.error(e))
47 46 }
... ... @@ -67,4 +66,12 @@ export class ComandaComponent implements OnInit {
67 66 }, e => console.error(e))
68 67 }
69 68  
  69 + rellenar(relleno, longitud) {
  70 + relleno = '' + relleno;
  71 + while (relleno.length < longitud) {
  72 + relleno = '0' + relleno;
  73 + }
  74 + return relleno;
  75 + }
  76 +
70 77 }
src/app/components/pedidos-salientes/pedidos-salientes.component.html
... ... @@ -17,7 +17,7 @@
17 17 class="col-12 p-2">
18 18 <div class="border rounded shadow h-big">
19 19 <div class="font-weight-bold m-0 h-100">
20   - {{rellenar(pedidosRecientes[0].id.toString().slice(pedidosRecientes[0].id.toString().length - 2), 2)}}
  20 + {{rellenar(pedidosRecientes[0].id.toString().slice(pedidosRecientes[0].id.toString().length - 3), 3)}}
21 21 </div>
22 22 </div>
23 23 </div>
... ... @@ -27,7 +27,7 @@
27 27 [hidden]="i == 0 || i > 8"
28 28 class="col-3 p-2">
29 29 <p class="font-weight-bold display-1 m-0 py-1 border rounded shadow">
30   - {{rellenar(pedido.id.toString().slice(pedido.id.toString().length - 2), 2)}}
  30 + {{rellenar(pedido.id.toString().slice(pedido.id.toString().length - 2), 3)}}
31 31 </p>
32 32 </div>
33 33  
src/app/services/comanda.service.ts
... ... @@ -2,7 +2,6 @@ import { Injectable } from &quot;@angular/core&quot;;
2 2 import { HttpClient } from "@angular/common/http";
3 3 import { appSettings } from "src/etc/AppSettings";
4 4 import { Observable } from "rxjs";
5   -import { Comanda } from '../wrappers/comanda';
6 5  
7 6 @Injectable({
8 7 providedIn: "root"