Commit 893ac0067d6384c51c0f8da0a121afbf8fa0063f
Exists in
develop
Merge branch 'develop' into 'develop'
Develop See merge request !105
Showing
1 changed file
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 |