Commit 5f00d6a73d7af2d89ba8ffd136d55b4b838b34de

Authored by Marcelo Puebla
1 parent ba5780e64f
Exists in master

Quitado cod.

src/app/components/busqueda-productos/busqueda-productos.component.html
1 <div class="row m-0 fade-in"> 1 <div class="row m-0 fade-in">
2 <div class="col-12 p-0"> 2 <div class="col-12 p-0">
3 3
4 <!-- NOMBRE DE SECCION --> 4 <!-- NOMBRE DE SECCION -->
5 <div class="row m-0"> 5 <div class="row m-0">
6 <div class="col-12 p-0"> 6 <div class="col-12 p-0">
7 <p class="h5 py-1 bg-gray text-muted text-center"> 7 <p class="h5 py-1 bg-gray text-muted text-center">
8 Búsqueda 8 Búsqueda
9 <i class="fa fa-search"></i> 9 <i class="fa fa-search"></i>
10 </p> 10 </p>
11 </div> 11 </div>
12 </div> 12 </div>
13 13
14 <div class="row m-3 disable-user-select"> 14 <div class="row m-3 disable-user-select">
15 15
16 <!-- FILTROS --> 16 <!-- FILTROS -->
17 <div *ngIf="verCategorias" class="col-sm-2 p-1"> 17 <div *ngIf="verCategorias" class="col-sm-2 p-1">
18 <div class="text-center"> 18 <div class="text-center">
19 <p class="font-weight-bold text-muted border-bottom pb-2">Buscar por Categoría</p> 19 <p class="font-weight-bold text-muted border-bottom pb-2">Buscar por Categoría</p>
20 </div> 20 </div>
21 <ul class="list-group"> 21 <ul class="list-group">
22 <li 22 <li
23 *ngFor="let categoria of categorias" 23 *ngFor="let categoria of categorias"
24 [ngClass]="{active: categoriaActive == categoria.id}" 24 [ngClass]="{active: categoriaActive == categoria.id}"
25 (click)="categoriaActive = categoria.id; filterItems()" 25 (click)="categoriaActive = categoria.id; filterItems()"
26 class="list-group-item list-group-item-action text-center my-1 p-2 h6"> 26 class="list-group-item list-group-item-action text-center my-1 p-2 h6">
27 {{categoria.detalle}} 27 {{categoria.detalle}}
28 </li> 28 </li>
29 </ul> 29 </ul>
30 </div> 30 </div>
31 31
32 <!-- SEARCH INPUT --> 32 <!-- SEARCH INPUT -->
33 <div *ngIf="productos.length > 0" class="fade-in col"> 33 <div *ngIf="productos.length > 0" class="fade-in col">
34 34
35 <div class="row search"> 35 <div class="row search">
36 <div class="col-sm-10"> 36 <div class="col-sm-10">
37 <span class="fa fa-search form-control-lg form-control-search pl-3"></span> 37 <span class="fa fa-search form-control-lg form-control-search pl-3"></span>
38 <input 38 <input
39 type="text" 39 type="text"
40 class="form-control form-control-lg shadow-sm rounded-pill px-5" 40 class="form-control form-control-lg shadow-sm rounded-pill px-5"
41 placeholder="Búsqueda productos" 41 placeholder="Búsqueda productos"
42 [(ngModel)]="searchTerm" 42 [(ngModel)]="searchTerm"
43 (ngModelChange)="filterItems()"> 43 (ngModelChange)="filterItems()">
44 </div> 44 </div>
45 <!-- BOTON VOLVER --> 45 <!-- BOTON VOLVER -->
46 <div class="col-sm-2"> 46 <div class="col-sm-2">
47 <button 47 <button
48 type="button" 48 type="button"
49 class="btn btn-light btn-lg shadow-sm" 49 class="btn btn-light btn-lg shadow-sm"
50 [routerLink]="['/inicio']"> 50 [routerLink]="['/inicio']">
51 <span class="font-weight-normal h6 pr-2">Volver</span> 51 <span class="font-weight-normal h6 pr-2">Volver</span>
52 <i class="fa fa-undo text-warning" aria-hidden="true"></i> 52 <i class="fa fa-undo text-warning" aria-hidden="true"></i>
53 </button> 53 </button>
54 </div> 54 </div>
55 <div class="col-sm-12 my-2"> 55 <div class="col-sm-12 my-2">
56 <span class="badge badge-light px-2">Más vendidos</span> 56 <span class="badge badge-light px-2">Más vendidos</span>
57 </div> 57 </div>
58 </div> 58 </div>
59 <!-- LISTA DE PRODUCTOS --> 59 <!-- LISTA DE PRODUCTOS -->
60 <div class="row align-items-start vh-70 overflow-scroll disable-user-select"> 60 <div class="row align-items-start vh-70 overflow-scroll disable-user-select">
61 <div 61 <div
62 class="col-4 p-2" 62 class="col-4 p-2"
63 *ngFor="let producto of auxProductos"> 63 *ngFor="let producto of auxProductos">
64 <div 64 <div
65 class="card-effect bg-white rounded-sm shadow border-0" 65 class="card-effect bg-white rounded-sm shadow border-0"
66 (click)="elegirProducto(producto)"> 66 (click)="elegirProducto(producto)">
67 <img src="{{apiUrl}}/imagenes/{{producto.imagenes[0].imagen}}" class="rounded-sm w-100 m-auto"> 67 <img src="{{apiUrl}}/imagenes/{{producto.imagenes[0].imagen}}" class="rounded-sm w-100 m-auto">
68 <div class="p-2"> 68 <div class="p-2">
69 <p class="h6 text-left m-0">{{producto.DetArt}}</p> 69 <p class="h6 text-left m-0">{{producto.DetArt}}</p>
70 <div class="row justify-content-between m-0"> 70 <div class="row justify-content-between m-0">
71 <div class="col-12 p-0"> 71 <div class="col-12 p-0">
72 <div class="text-left"> 72 <div class="text-left">
73 <p class="m-0 h6"><small>{{producto.DetArt}}</small></p> 73 <p class="m-0 h6"><small>{{producto.DET_LAR}}</small></p>
74 <p class="m-0 h6"><small>COD. {{producto.CodRub}}</small></p>
75 </div> 74 </div>
76 </div> 75 </div>
77 <div class="col-12 my-auto pt-2 pr-2 p-0"> 76 <div class="col-12 my-auto pt-2 pr-2 p-0">
78 <p class="text-right m-0 h6">{{producto.PreVen | currency}}</p> 77 <p class="text-right m-0 h6">{{producto.PreVen | currency}}</p>
79 </div> 78 </div>
80 </div> 79 </div>
81 </div> 80 </div>
82 </div> 81 </div>
83 </div> 82 </div>
84 </div> 83 </div>
85 </div> 84 </div>
86 85
87 <!-- SPINNER --> 86 <!-- SPINNER -->
88 <div 87 <div
89 *ngIf="productos.length === 0 && showSpinner" 88 *ngIf="productos.length === 0 && showSpinner"
90 class="col-sm-10 p-0 align-self-center text-center"> 89 class="col-sm-10 p-0 align-self-center text-center">
91 <div class="spinner-border spinner-lg text-secondary" role="status"></div> 90 <div class="spinner-border spinner-lg text-secondary" role="status"></div>
92 <span class="text-secondary m-2 h5">Cargando información.</span> 91 <span class="text-secondary m-2 h5">Cargando información.</span>
93 </div> 92 </div>
94 93
95 </div> 94 </div>
96 95
97 </div> 96 </div>
98 97
99 </div> 98 </div>
100 99