Commit 1f79a6c5a650f93bbb6c48c421301b4736fdffd8

Authored by Marcelo Puebla
1 parent d0db3326b5
Exists in develop

Fix lint

src/app/modules/admin/admin.component.ts
... ... @@ -12,13 +12,13 @@ export class AdminComponent implements OnInit {
12 12  
13 13 constructor(
14 14 private router: Router,
15   - ) { }
16   -
17   - ngOnInit() {
18   - this.startTimeOutInactividad();
19   - }
  15 + ) { }
  16 +
  17 + ngOnInit() {
  18 + this.startTimeOutInactividad();
  19 + }
20 20  
21   - @HostListener('document:click', ['$event'])
  21 + @HostListener('document:click', ['$event'])
22 22  
23 23 documentClick(event: MouseEvent) {
24 24 if (event) {
src/app/modules/comanda/comanda.component.ts
... ... @@ -21,7 +21,7 @@ export class ComandaComponent implements OnInit {
21 21 this.timerGetComandas();
22 22 }
23 23  
24   - ngOnDestroy() {
  24 + OnDestroy() {
25 25 clearInterval(this.cicloTime);
26 26 }
27 27  
... ... @@ -40,8 +40,8 @@ export class ComandaComponent implements OnInit {
40 40  
41 41 addNewComandas(resComandas: IComanda[]) {
42 42 for (let j = 0; j < resComandas.length; j++) {
43   - for (let i = 0; i < this.comandas.length; i++) {
44   - if (this.comandas[i].id === resComandas[j].id) {
  43 + for (const comanda of this.comandas) {
  44 + if (comanda.id === resComandas[j].id) {
45 45 resComandas.splice(j, 1);
46 46 }
47 47 }
... ... @@ -60,7 +60,7 @@ export class ComandaComponent implements OnInit {
60 60 tiempoElaboracion: `${comanda.hoursElaboracion}:${comanda.secondsElaboracion}:${comanda.secondsElaboracion}`,
61 61 };
62 62 if (data.estado === 3) {
63   - this.comandaService.imprimirComandaCocina(parseInt(data.idComanda))
  63 + this.comandaService.imprimirComandaCocina(parseInt(data.idComanda, 10))
64 64 .subscribe(res => { }, err => console.error(err)
65 65 );
66 66 }
src/app/modules/mensaje-final/mensaje-final.component.ts
... ... @@ -21,7 +21,7 @@ export class MensajeFinalComponent implements OnInit {
21 21 }, 10000);
22 22 }
23 23  
24   - ngOnDestroy() {
  24 + OnDestroy() {
25 25 clearTimeout(this.timer);
26 26 }
27 27  
src/app/modules/seleccion-articulos/seleccion-articulos.component.ts
... ... @@ -25,7 +25,7 @@ export class SeleccionArticulosComponent implements OnInit {
25 25 ordenandoByVendidos = true;
26 26 allActive = true;
27 27 modalRef: BsModalRef;
28   - total: number = 0;
  28 + total = 0;
29 29  
30 30 constructor(
31 31 public articuloService: ArticuloService,
src/app/services/articulo/articulo.service.ts
... ... @@ -15,7 +15,7 @@ export class ArticuloService {
15 15 urlDeboSuite = APP_SETTINGS.apiDeboSuite;
16 16 medioPago: number;
17 17 idComanda: number;
18   - subTotal: number = 0;
  18 + subTotal = 0;
19 19  
20 20 constructor(
21 21 private http: HttpClient,
src/app/services/comanda/comanda.service.ts
... ... @@ -17,8 +17,8 @@ export class ComandaService {
17 17 return this.http.get(`${this.urlDeboSuite}/comandas/pendientes-entrega`);
18 18 }
19 19  
20   - update(data: object) {
21   - return this.http.post(`${this.urlDeboSuite}/comandas/update`, { data: data });
  20 + update(object: object) {
  21 + return this.http.post(`${this.urlDeboSuite}/comandas/update`, { data: object });
22 22 }
23 23  
24 24 getAll() {