From 01db302e7e3964be578fbc4be66f33f41b226df0 Mon Sep 17 00:00:00 2001 From: Eric Fernandez Date: Thu, 5 Sep 2019 16:04:05 -0300 Subject: [PATCH] timeout --- package.json | 4 +++- src/app/components/comanda/comanda.component.html | 8 +++++--- src/app/components/comanda/comanda.component.ts | 24 +++++++++++++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c659d6f..b59271d 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "bootstrap": "^4.3.1", "font-awesome": "^4.7.0", "jquery": "^1.12.4", + "lodash": "^4.17.15", "material-design-icons": "^3.0.1", "ngx-bootstrap": "^5.1.1", "popper.js": "^1.15.0", @@ -39,9 +40,10 @@ "@angular/cli": "~8.0.0", "@angular/compiler-cli": "~8.0.0", "@angular/language-service": "~8.0.0", - "@types/node": "~8.9.4", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", + "@types/lodash": "^4.14.138", + "@types/node": "~8.9.4", "codelyzer": "^5.0.0", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", diff --git a/src/app/components/comanda/comanda.component.html b/src/app/components/comanda/comanda.component.html index 4908e7f..068013f 100644 --- a/src/app/components/comanda/comanda.component.html +++ b/src/app/components/comanda/comanda.component.html @@ -12,10 +12,12 @@ 'bg-danger': comanda.estado === 2, 'bg-success': comanda.estado === 3 }"> - +
-

Title

-

Text

+

{{comanda.detalles[0].articulo.DetArt}}

+

{{comanda.detalles[0].articulo.DET_LAR}}

{ + .subscribe((res: Comanda[]) => { + + if (!_.isEqual(res, this.comandas)) { this.comandas = res; - }, e => console.error(e)) + } + }, e => console.error(e)) + } + + ciclo() { + + this.cicloTime = setTimeout(() => { + this.buscar(); + this.ciclo(); + }, 5000); } updateComanda(comanda: Comanda, estadoNuevo: number, observacionNueva: string) { -- 1.9.1