mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add inactivity
This commit is contained in:
@@ -22,6 +22,7 @@ export class InactivityPage implements OnInit {
|
||||
code = []
|
||||
setPin = false
|
||||
SessionStore = SessionStore
|
||||
enterWithPassword = false
|
||||
|
||||
constructor(
|
||||
private notificatinsservice: NotificationsService,
|
||||
@@ -78,14 +79,14 @@ export class InactivityPage implements OnInit {
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
await this.getToken();
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
|
||||
this.goback()
|
||||
} else {
|
||||
SessionStore.delete()
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
}
|
||||
|
||||
|
||||
this.enterWithPassword = false
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -129,7 +130,7 @@ export class InactivityPage implements OnInit {
|
||||
|
||||
if( SessionStore.validatePin(code)) {
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
this.goback()
|
||||
this.clearCode()
|
||||
} else {
|
||||
this.toastService.badRequest('Pin incorreto')
|
||||
@@ -138,6 +139,11 @@ export class InactivityPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
goback() {
|
||||
const pathName = this.SessionStore.user.UrlBeforeInactivity
|
||||
this.router.navigate([pathName]);
|
||||
}
|
||||
|
||||
storePin() {
|
||||
|
||||
const code = this.code.join('')
|
||||
@@ -148,4 +154,8 @@ export class InactivityPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
enterWithPasswordButton() {
|
||||
this.enterWithPassword = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user