Commit 11b22496b53a18eb4bef25e7a5ca6e0f5d8d59cf
1 parent
c3031ecc9e
Exists in
master
and in
1 other branch
Arreglo para mostrar el nombre de seccion correspondiente.
Showing
2 changed files
with
18 additions
and
14 deletions
Show diff stats
src/app/components/busqueda-productos/busqueda-productos.component.html
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: |