Commit d0ff3db89d4c8c990f101869743e74cd2fa5c885

Authored by Marcelo Puebla
1 parent 03a726ea54
Exists in master

Arreglo de vista.

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