Commit 36f686b8f8e2fa6e0507e3559161f704d8eda733

Authored by Marcelo Puebla
Exists in develop

Merge branch 'develop' into 'develop'

Develop

See merge request !154
src/app/services/articulo/articulo.service.ts
... ... @@ -16,7 +16,6 @@ export class ArticuloService {
16 16 medioPago: number;
17 17 idComanda: number;
18 18 total = 0;
19   - maxCantidad = 50;
20 19  
21 20 constructor(
22 21 private http: HttpClient,
... ... @@ -42,7 +41,7 @@ export class ArticuloService {
42 41 }
43 42  
44 43 addCant(articulo: IArticulo) {
45   - if (articulo.cantidad >= this.maxCantidad) return;
  44 + if (articulo.cantidad >= articulo.ExiVta) return;
46 45 articulo.cantidad++;
47 46 this.calcularTotal();
48 47 }
src/app/shared/promocion/promocion.component.html
... ... @@ -31,7 +31,9 @@
31 31 </div>
32 32 </div>
33 33 <div class="modal-body" *ngIf="articulosPromo.length">
34   - <div class="row no-gutters w-100">
  34 + <div
  35 + class="row no-gutters w-100"
  36 + *ngIf="promociones.length && !loading">
35 37 <div class="col-9 col-9 align-self-center">
36 38 <p class="text-white"><small>¿TE GUSTARÍA LLEVAR ESTE ARTÍCULO</small></p>
37 39 <p class="h1 text-white">en un combo?</p>
... ... @@ -46,6 +48,14 @@
46 48 class="card-img-top img-fluid rounded-circle">
47 49 </div>
48 50 </div>
  51 + <div>
  52 + <div
  53 + class="row no-gutters w-100"
  54 + *ngIf="!promociones.length && !loading">
  55 + <div class="col-12 text-center">
  56 + <p class="text-white"><small>NO HAY PROMOS CON STOCK</small></p>
  57 + </div>
  58 + </div>
49 59 <div
50 60 class="d-flex justify-content-center mt-2"
51 61 *ngIf="loading">
src/app/shared/promocion/promocion.component.ts
... ... @@ -104,8 +104,9 @@ export class PromocionComponent implements OnInit {
104 104 const codigo = this.articulosPromo[0].CodArt;
105 105 this.promocionService.getPromociones(sector, codigo)
106 106 .subscribe((res: IArticulo[]) => {
107   - this.promociones = res;
  107 + res = res.filter(a => a.ExiVta > 0);
108 108 this.loading = false;
  109 + this.promociones = res;
109 110 }, error => { console.error(error); });
110 111 }
111 112  
src/app/shared/sinonimo/sinonimo.component.html
... ... @@ -16,7 +16,8 @@
16 16 <div class="lista-sinonimos scroll-y-visible">
17 17 <div
18 18 class="row mx-0 mb-2 fade-in-left"
19   - *ngFor="let articulo of sinonimos[currentIndex].productos">
  19 + *ngFor="let articulo of sinonimos[currentIndex].productos"
  20 + [hidden]="articulo.ExiVta <= 0">
20 21 <div class="col-8 p-0 my-auto h6 text-right">
21 22 <p class="m-0 font-weight-normal">
22 23 {{articulo.MKT_DESC ? articulo.MKT_DESC.toUpperCase() : articulo.DetArt.toUpperCase()}}