Commit 11b22496b53a18eb4bef25e7a5ca6e0f5d8d59cf

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

Arreglo para mostrar el nombre de seccion correspondiente.

src/app/components/busqueda-productos/busqueda-productos.component.html
... ... @@ -5,8 +5,8 @@
5 5 <div class="row m-0">
6 6 <div class="col-12 p-0">
7 7 <p class="h5 py-1 bg-gray text-muted text-center">
8   - Búsqueda
9   - <i class="fa fa-search"></i>
  8 + {{title}}
  9 + <i *ngIf="title === 'Búsqueda'" class="fa fa-search"></i>
10 10 </p>
11 11 </div>
12 12 </div>
src/app/components/busqueda-productos/busqueda-productos.component.ts
... ... @@ -17,11 +17,12 @@ export class BusquedaProductosComponent implements OnInit {
17 17 private searchTerm: string = '';
18 18 private categoriaActive: number = null;
19 19 private showSpinner: boolean = true;
20   - private queMostrar: string = 'todo';
  20 + private queMostrar: string = 'todos';
21 21 private apiImagenes: string = appSettings.apiImagenes;
22 22 private categorias: Categoria[] = [];
23 23 private blurFocus = new EventEmitter();
24 24 private ordenandoByVendidos = true;
  25 + private title: string = 'Búsqueda'
25 26  
26 27 constructor(
27 28 private productoService: ProductoService,
... ... @@ -38,18 +39,21 @@ export class BusquedaProductosComponent implements OnInit {
38 39 case 'todos':
39 40 this.categorias = categorias;
40 41 this.categoriaActive = 0;
  42 + this.title = 'Búsqueda';
41 43 break;
42   - case 'promociones':
43   - this.categorias = categorias;
44   - this.categoriaActive = 1;
45   - break;
46   - case 'ordenar':
47   -
48   - this.categorias = categorias.filter((categoria: Categoria) => {
49   - return categoria.ES_PEDIDO;
50   - });
51   -
52   - this.categoriaActive = 0;
  44 + case 'promociones':
  45 + this.categorias = categorias;
  46 + this.categoriaActive = 1;
  47 + this.title = 'Promociones';
  48 + break;
  49 + case 'ordenar':
  50 +
  51 + this.categorias = categorias.filter((categoria: Categoria) => {
  52 + return categoria.ES_PEDIDO;
  53 + });
  54 +
  55 + this.categoriaActive = 0;
  56 + this.title = 'Ordenar';
53 57  
54 58 break;
55 59 default: