Commit 626f06442a7be9a2adc183fad1c04c3d7b2acd77

Authored by Eric Fernandez
Exists in master

Merge branch 'master' of http://git.focasoftware.com/angular/autoservicio

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/sidebar/sidebar.component.html
... ... @@ -49,7 +49,7 @@
49 49 <!-- PERSONALIZAR -->
50 50 <div class="col-auto px-1 my-2">
51 51 <button
52   - *ngIf="esPersonalizable(producto)"
  52 + *ngIf="producto.tieneSinonimos"
53 53 type="button"
54 54 class="btn btn-light btn-sm my-auto float-left border shadow"
55 55 (click)="personalizarPromo(producto, i)">
src/app/components/sidebar/sidebar.component.ts
... ... @@ -78,15 +78,6 @@ export class SidebarComponent implements OnInit {
78 78 return;
79 79 }
80 80  
81   - esPersonalizable(producto: Producto) {
82   -
83   - var esPersonalizable: boolean = false;
84   - if (producto.tieneSinonimos)
85   - esPersonalizable = true;
86   -
87   - return esPersonalizable;
88   - }
89   -
90 81 personalizarPromo(producto: Producto, index) {
91 82  
92 83 this.productoService.productoAcargar = producto;