Commit ae020369cd2976b564e21f4a7e2a6c925c9dc315
1 parent
f09b30280b
Exists in
master
Quitado scroll de body, quitado boton de cargar producto en busqueda de productos.
Showing
3 changed files
with
6 additions
and
23 deletions
Show diff stats
src/app/components/busqueda-productos/busqueda-productos.component.html
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | <!-- SEARCH INPUT --> |
33 | 33 | <div *ngIf="productos.length > 0" class="fade-in col"> |
34 | 34 | |
35 | - <div class="form-group row search"> | |
35 | + <div class="row search"> | |
36 | 36 | <div class="col-sm-10"> |
37 | 37 | <span class="fa fa-search form-control-lg form-control-search pl-3"></span> |
38 | 38 | <input |
... | ... | @@ -52,6 +52,9 @@ |
52 | 52 | <i class="fa fa-undo text-warning" aria-hidden="true"></i> |
53 | 53 | </button> |
54 | 54 | </div> |
55 | + <div class="col-sm-12 my-2"> | |
56 | + <span class="badge badge-light px-2">Más vendidos</span> | |
57 | + </div> | |
55 | 58 | </div> |
56 | 59 | <!-- LISTA DE PRODUCTOS --> |
57 | 60 | <div class="row align-items-start vh-70 overflow-scroll disable-user-select"> |
... | ... | @@ -60,7 +63,7 @@ |
60 | 63 | *ngFor="let producto of auxProductos"> |
61 | 64 | <div |
62 | 65 | class="card-effect bg-white rounded-sm shadow border-0" |
63 | - (click)="mostrarBotonCargar(producto)"> | |
66 | + (click)="elegirProducto(producto)"> | |
64 | 67 | <img src="{{apiUrl}}/imagenes/{{producto.imagenes[0].imagen}}" class="rounded-sm w-100 m-auto"> |
65 | 68 | <div class="p-2"> |
66 | 69 | <p class="h6 text-left m-0">{{producto.DetArt}}</p> |
... | ... | @@ -75,16 +78,6 @@ |
75 | 78 | <p class="text-right m-0 h6">{{producto.PreVen | currency}}</p> |
76 | 79 | </div> |
77 | 80 | </div> |
78 | - <div *ngIf="producto.showCargarProducto" class="row mt-2 fade-bottom"> | |
79 | - <div class="col-sm-12"> | |
80 | - <button | |
81 | - type="button" | |
82 | - class="btn btn-block btn-outline-primary shadow" | |
83 | - (click)="elegirProducto(producto)"> | |
84 | - Cargar Producto | |
85 | - </button> | |
86 | - </div> | |
87 | - </div> | |
88 | 81 | </div> |
89 | 82 | </div> |
90 | 83 | </div> |
src/app/components/busqueda-productos/busqueda-productos.component.ts
... | ... | @@ -19,7 +19,6 @@ export class BusquedaProductosComponent implements OnInit { |
19 | 19 | private showSpinner: boolean = true; |
20 | 20 | private verCategorias: boolean = true; |
21 | 21 | private apiUrl: string = appSettings.apiUrl; |
22 | - private showBtnCargarProducto: boolean = false; | |
23 | 22 | private categorias: Categoria[] = []; |
24 | 23 | |
25 | 24 | constructor( |
... | ... | @@ -62,16 +61,6 @@ export class BusquedaProductosComponent implements OnInit { |
62 | 61 | this.productoService.productos.push(producto); |
63 | 62 | } |
64 | 63 | |
65 | - private mostrarBotonCargar(producto: Producto) { | |
66 | - | |
67 | - for (let i = 0; i < this.auxProductos.length; i++) { | |
68 | - if (this.auxProductos[i].id !== producto.id) | |
69 | - this.auxProductos[i].showCargarProducto = false; | |
70 | - else if (producto.showCargarProducto) return; | |
71 | - } | |
72 | - producto.showCargarProducto = !producto.showCargarProducto | |
73 | - } | |
74 | - | |
75 | 64 | private elegirProducto(producto: Producto) { |
76 | 65 | |
77 | 66 | this.productoService.productoAcargar = producto; |