Commit 4078f8255e2dc9ba52bcf023a8afa97f16fa96e0
1 parent
c44a00eefe
Exists in
develop
Fix
Al mostrar componente de cancelar compra en pago-electronico y pago-tarjeta
Showing
1 changed file
with
5 additions
and
1 deletions
 
Show diff stats
src/app/services/inactive-screen/inactive-screen.service.ts
| 1 | import { Injectable } from '@angular/core'; | 1 | import { Injectable } from '@angular/core'; | 
| 2 | import { Router } from '@angular/router'; | 2 | import { Router } from '@angular/router'; | 
| 3 | 3 | ||
| 4 | @Injectable({ | 4 | @Injectable({ | 
| 5 | providedIn: 'root' | 5 | providedIn: 'root' | 
| 6 | }) | 6 | }) | 
| 7 | export class InactiveScreenService { | 7 | export class InactiveScreenService { | 
| 8 | timerReposo: any; | 8 | timerReposo: any; | 
| 9 | 9 | ||
| 10 | constructor( | 10 | constructor( | 
| 11 | private router: Router, | 11 | private router: Router, | 
| 12 | ) { } | 12 | ) { } | 
| 13 | 13 | ||
| 14 | startTimeOutInactividad() { | 14 | startTimeOutInactividad() { | 
| 15 | this.timerReposo = setTimeout(() => { | 15 | this.timerReposo = setTimeout(() => { | 
| 16 | this.router.navigate(['cancelar-compra']); | 16 | if (this.router.url === '/pago-electronico' || this.router.url === '/pago-tarjeta') { | 
| 17 | this.startTimeOutInactividad(); | ||
| 18 | } else { | ||
| 19 | this.router.navigate(['cancelar-compra']); | ||
| 20 | } | ||
| 17 | }, 90000); | 21 | }, 90000); | 
| 18 | } | 22 | } | 
| 19 | } | 23 | } | 
| 20 | 24 |