mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
check notification and inactivity
This commit is contained in:
@@ -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');
|
||||
} */
|
||||
|
||||
Reference in New Issue
Block a user