This commit is contained in:
tiago.kayaya
2022-04-07 15:57:22 +01:00
parent e631cfa8e2
commit d26b0c16ad
2 changed files with 18 additions and 22 deletions
+7 -7
View File
@@ -109,10 +109,10 @@ export class LoginPage implements OnInit {
await this.authService.SetSession(attempt, this.userattempt);
console.log(this.p.userPermission(this.permissionList.Chat.access));
console.log(this.p.userPermission(this.p.permissionList.Chat.access));
if(this.p.userPermission(this.permissionList.Chat.access)){
if(this.p.userPermission(this.p.permissionList.Chat.access)){
await this.authService.loginChat();
await this.authService.loginToChatWs();
}
@@ -132,7 +132,7 @@ export class LoginPage implements OnInit {
this.changeProfileService.run();
if(this.p.userPermission(this.permissionList.Chat.access)){
if(this.p.userPermission(this.p.permissionList.Chat.access)){
await this.authService.loginChat();
await this.authService.loginToChatWs();
}
@@ -154,7 +154,7 @@ export class LoginPage implements OnInit {
this.toastService._badRequest('Por favor, insira o seu nome de utilizador');
}
}
goback() {
@@ -162,13 +162,13 @@ export class LoginPage implements OnInit {
if(pathName) {
this.router.navigate([pathName]);
} else {
if(this.p.userPermission(this.permissionList.Agenda.access) || this.p.userPermission(this.permissionList.Gabinete.access)){
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){
this.router.navigate(['/home/events']);
}
else if(this.p.userPermission(this.permissionList.Chat.access) && this.p.userPermission(this.permissionList.Actions.access)){
else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){
this.router.navigate(['/home/chat']);
}
else if(this.p.userPermission(this.permissionList.Actions.access)){
else if(this.p.userPermission(this.p.permissionList.Actions.access)){
this.router.navigate(['/home/publications']);
}
}