Commit 6bdda4609db20108ded9d824ae6d1bc85d2ff746
1 parent
4fd63e25ff
Exists in
develop
correccion de sintaxis
Showing
2 changed files
with
7 additions
and
6 deletions
Show diff stats
src/app/modules/seleccion-articulos/filtro-categorias/filtro-categorias.component.html
... | ... | @@ -39,7 +39,8 @@ |
39 | 39 | 'media-pantalla': templateCategorias.classList.contains('media-pantalla')}" |
40 | 40 | (click)="selectCategoria(i, categoria.id)" |
41 | 41 | id="cat-content" |
42 | - *ngIf="categoria.articulos > 0 && compararFecha(categoria.vigencia_desde,categoria.vigencia_hasta)"> | |
42 | + *ngIf="categoria.articulos > 0 | |
43 | + && compararFecha(categoria.vigencia_desde,categoria.vigencia_hasta)"> | |
43 | 44 | <img |
44 | 45 | draggable="false" |
45 | 46 | ondragstart="return false;" |
src/app/modules/seleccion-articulos/filtro-categorias/filtro-categorias.component.ts
... | ... | @@ -19,7 +19,7 @@ export class FiltroCategoriasComponent implements OnInit { |
19 | 19 | allActive = true; |
20 | 20 | queMostrar = 'todos'; |
21 | 21 | urlImagenes = `${APP_SETTINGS.apiImagenes}/imagenes/`; |
22 | - | |
22 | + | |
23 | 23 | constructor( |
24 | 24 | private categoriaService: CategoriaService, |
25 | 25 | private inactiveScreen: InactiveScreenService |
... | ... | @@ -87,15 +87,15 @@ export class FiltroCategoriasComponent implements OnInit { |
87 | 87 | }, 500); |
88 | 88 | } |
89 | 89 | |
90 | - compararFecha(fechaInicioString: string,fechaFinString: string) { | |
90 | + compararFecha(fechaInicioString: string, fechaFinString: string) { | |
91 | 91 | const fechaInicio = new Date(fechaInicioString); |
92 | 92 | const fechaFin = new Date(fechaFinString); |
93 | 93 | const fechaAux = Date.now(); |
94 | - const fechaHoy = new Date(fechaAux) | |
94 | + const fechaHoy = new Date(fechaAux); | |
95 | 95 | if (fechaHoy >= fechaInicio && fechaHoy <= fechaFin) { |
96 | - return true | |
96 | + return true; | |
97 | 97 | } else { |
98 | - return false | |
98 | + return false; | |
99 | 99 | } |
100 | 100 | } |
101 | 101 |