check notification and inactivity

This commit is contained in:
Peter Maquiran
2023-09-28 09:02:15 +01:00
parent b46d179dfe
commit 8de8a35bfc
11 changed files with 93 additions and 60 deletions
+14 -14
View File
@@ -94,7 +94,7 @@ export class LoginPage implements OnInit {
buttons: ['OK']
});
await alert.present();
}
@@ -121,12 +121,10 @@ export class LoginPage implements OnInit {
let attempt = await this.authService.login(this.userattempt, {saveSession: false})
const data = await this.authService.loginContenteProduction(this.userattempt, {saveSession: true})
loader.remove()
console.log('attempt', attempt)
if (attempt) {
if (attempt.UserId == SessionStore.user.UserId) {
@@ -135,23 +133,24 @@ export class LoginPage implements OnInit {
this.changeProfileService.run();
if(attempt.ChatData) {
await this.authService.loginToChatWs();
this.ChatService.setheader()
this.ChatSystemService.loadChat();
}
this.changeProfileService.runLogin();
this.getToken();
SessionStore.setInativity(true);
SessionStore.hasPassLogin = true;
this.goback();
} else {
this.RochetChatConnectorService.logout();
this.clearStoreService.clear();
this.ChatSystemService.clearChat();
@@ -165,9 +164,9 @@ export class LoginPage implements OnInit {
await this.authService.SetSession(attempt, this.userattempt);
CPSession.save(data)
this.changeProfileService.run();
if(attempt.ChatData) {
await this.authService.loginToChatWs();
this.ChatService.setheader();
@@ -182,14 +181,15 @@ export class LoginPage implements OnInit {
} else {
this.router.navigateByUrl('/pin', { replaceUrl: true });
}
} else {
this.router.navigate(['/home/events']);
}
SessionStore.hasPassLogin = true;
}
}/*
}/*
else{
this.toastService._badRequest('Ocorreu um problema por favor valide o username e password');
} */