From c1bff40832429bbeeaa18753a5f96c1321894b25 Mon Sep 17 00:00:00 2001 From: Gabo Date: Thu, 4 Jun 2020 09:29:23 -0300 Subject: [PATCH] feat(rup): arregla navegacion defectuosa entre huds y mapa-camas --- .../registros-huds-detalle.component.ts | 1 + .../rup/components/ejecucion/vistaHuds.component.ts | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/apps/rup/mapa-camas/sidebar/registros-huds-detalle/registros-huds-detalle.component.ts b/src/app/apps/rup/mapa-camas/sidebar/registros-huds-detalle/registros-huds-detalle.component.ts index 2c07d5f881..fb32c3ba0a 100644 --- a/src/app/apps/rup/mapa-camas/sidebar/registros-huds-detalle/registros-huds-detalle.component.ts +++ b/src/app/apps/rup/mapa-camas/sidebar/registros-huds-detalle/registros-huds-detalle.component.ts @@ -131,6 +131,7 @@ export class RegistrosHudsDetalleComponent implements OnInit { verHuds() { this.cama$.pipe(take(1)).subscribe((cama) => { + this.prestacionService.notificaRuta({ nombre: 'Mapa de Camas', ruta: '/internacion/mapa-camas' }); this.router.navigate(['/rup/huds/paciente/' + cama.paciente.id]); }); } diff --git a/src/app/modules/rup/components/ejecucion/vistaHuds.component.ts b/src/app/modules/rup/components/ejecucion/vistaHuds.component.ts index df07e38389..76d3178144 100644 --- a/src/app/modules/rup/components/ejecucion/vistaHuds.component.ts +++ b/src/app/modules/rup/components/ejecucion/vistaHuds.component.ts @@ -10,7 +10,6 @@ import { PrestacionesService } from '../../services/prestaciones.service'; import { ConceptObserverService } from './../../services/conceptObserver.service'; import { HeaderPacienteComponent } from '../../../../components/paciente/headerPaciente.component'; import { HUDSService } from '../../services/huds.service'; -import { Location } from '@angular/common'; import { SeguimientoPacienteService } from '../../services/seguimientoPaciente.service'; @@ -43,7 +42,6 @@ export class VistaHudsComponent implements OnInit, OnDestroy { public auth: Auth, private router: Router, private route: ActivatedRoute, - private location: Location, private servicioPaciente: PacienteService, private logService: LogService, private servicioPrestacion: PrestacionesService, @@ -141,7 +139,11 @@ export class VistaHudsComponent implements OnInit, OnDestroy { */ volver() { // this.location.back(); - this.router.navigate(['/rup']); + if (this.rutaVolver) { + this.router.navigate([this.rutaVolver]); + } else { + this.router.navigate(['/rup']); + } } evtCambiaPaciente() {