Commit d4a4dba23c3515380d2f8363a1a126aee25c137e

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

Merge branch 'master' into 'master'

Master(efernandez)

See merge request !40
src/app/components/busqueda-productos/busqueda-productos.component.ts
... ... @@ -65,11 +65,13 @@ export class BusquedaProductosComponent implements OnInit {
65 65  
66 66 if (producto.PRO) {
67 67  
  68 + let imagenes = producto.imagenes;
68 69 this.productoService.getPromocionByCodigos(producto.CodSec, producto.CodArt)
69 70 .subscribe(res => {
70 71  
71 72 this.productoService.productoAcargar = res[0];
72   - this.router.navigate(['inicio']);
  73 + this.productoService.productoAcargar.imagenes = imagenes;
  74 + this.router.navigate(['inicio']);
73 75 },
74 76 error => { console.error(error); }
75 77 );
src/app/components/confirmacion-carrito/confirmacion-carrito.component.html
... ... @@ -36,18 +36,18 @@
36 36 <div class="row ml-4 pr-3 vh-70 overflow-scroll text-dark">
37 37 <div class="col-4 p-2" *ngFor="let producto of productos">
38 38 <div class="bg-white rounded-sm shadow border-0">
39   - <img src="{{apiUrl}}/imagenes/testImg.jpg" class="rounded-sm w-100 m-auto">
  39 + <img src="{{apiUrl}}/imagenes/{{producto.imagenes[0].imagen}}" class="rounded-sm w-100 m-auto">
40 40 <div class="p-2">
41   - <p class="h6 text-left m-0">ZARAZA</p>
  41 + <p class="h6 text-left m-0">{{producto.DetArt}}</p>
42 42 <div class="row justify-content-between m-0">
43 43 <div class="col-12 p-0">
44 44 <div class="text-left">
45   - <p class="m-0 h6"><small>ZARAZA DETALLE</small></p>
46   - <p class="m-0 h6"><small>COD. 5656</small></p>
  45 + <p class="m-0 h6"><small>{{producto.DET_LAR}}</small></p>
  46 + <p class="m-0 h6"><small>{{producto.CodSec}}-{{producto.CodArt}}</small></p>
47 47 </div>
48 48 </div>
49 49 <div class="col-12 my-auto pt-2 pr-2 p-0">
50   - <p class="text-right m-0 h6">{{20 | currency}}</p>
  50 + <p class="text-right m-0 h6">{{producto.PreVen | currency}}</p>
51 51 </div>
52 52 </div>
53 53 </div>
src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts
1 1 import { Component, OnInit } from '@angular/core';
2 2 import { appSettings } from 'src/etc/AppSettings';
3 3 import { Location } from '@angular/common';
  4 +import { ProductoService } from 'src/app/services/producto.service';
4 5  
5 6 @Component({
6 7 selector: 'app-confirmacion-carrito',
... ... @@ -9,12 +10,13 @@ import { Location } from &#39;@angular/common&#39;;
9 10 })
10 11 export class ConfirmacionCarritoComponent implements OnInit {
11 12  
12   - productos = [{}, {}, {}];
  13 + productos = [];
13 14 private apiUrl: string = appSettings.apiUrl;
14 15  
15   - constructor(private location: Location) { }
  16 + constructor(private location: Location, private productoService: ProductoService) { }
16 17  
17 18 ngOnInit() {
  19 + this.productos = this.productoService.productos;
18 20 }
19 21  
20 22 volverPreviousPage() {
src/app/components/inicio/inicio.component.html
... ... @@ -129,9 +129,9 @@
129 129  
130 130 <!-- PROMO A CARGAR -->
131 131 <div class="fade-in m-0" *ngIf="promoAcargar">
132   - <!-- <img
  132 + <img
133 133 class="card-img-top d-block w-100 mx-auto rounded-sm"
134   - src="{{apiUrl}}/imagenes/{{promoAcargar. imagenes[0].imagen}}"> -->
  134 + src="{{apiUrl}}/imagenes/{{promoAcargar.imagenes[0].imagen}}">
135 135  
136 136 <div class="row justify-content-between m-3">
137 137 <div class="col-12 text-left px-1">
src/app/components/sidebar/sidebar.component.html
... ... @@ -11,7 +11,7 @@
11 11 <div
12 12 class="slide-in-bl my-2 bg-white border-0 rounded-sm"
13 13 *ngFor="let producto of productosCarrito.slice().reverse(); let i = index">
14   - <!-- <img class="w-100 m-auto rounded-sm shadow" src="{{apiUrl}}/imagenes/{{producto.imagenes[0].imagen}}"> -->
  14 + <img class="w-100 m-auto rounded-sm shadow" src="{{apiUrl}}/imagenes/{{producto.imagenes[0].imagen}}">
15 15 <div class="row m-0 p-0 px-1 py-1 shadow rounded-sm">
16 16 <div class="col-12 p-0 pt-2 text-left my-auto">
17 17 <p class="m-0 h6"><small>{{producto.DetArt}}</small></p>
src/app/wrappers/producto.ts
... ... @@ -94,4 +94,5 @@ export interface Producto {
94 94 idSinonimo?: number;
95 95 productos?: Producto[];
96 96 tieneSinonimos?: boolean;
  97 + imagenes: object[]
97 98 }