chat retry

This commit is contained in:
Peter Maquiran
2022-12-26 15:41:11 +01:00
parent b83fff6fbd
commit 0a3fd0ec8b
79 changed files with 223 additions and 1025 deletions
+9 -22
View File
@@ -16,7 +16,7 @@ import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-co
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { ChatService } from 'src/app/services/chat.service';
import { Platform } from '@ionic/angular';
import { FirstEnterService } from '../../services/first-enter.service';
@Component({
selector: 'app-login',
@@ -52,10 +52,13 @@ export class LoginPage implements OnInit {
public ChatSystemService: ChatSystemService,
private ChatService: ChatService,
private platform: Platform,
) {}
private FirstEnterService: FirstEnterService
) {
console.log('constructor')
}
ngOnInit() {
console.log('ngOngInit')
}
togglePassword() {
@@ -68,7 +71,6 @@ export class LoginPage implements OnInit {
}
}
//
//Function to validade the login inputs
validateUsername() {
@@ -134,7 +136,7 @@ export class LoginPage implements OnInit {
}
this.changeProfileService.runLogin();
this.getToken();
// this.getToken();
SessionStore.setInativity(true);
this.goback();
@@ -160,7 +162,7 @@ export class LoginPage implements OnInit {
this.ChatSystemService.loadChat();
}
this.getToken();
// this.getToken();
if(!this.platform.is('desktop') && !this.platform.is('mobileweb')) {
if(this.sessionStore.hasPin) {
@@ -196,22 +198,7 @@ export class LoginPage implements OnInit {
if(pathName) {
this.router.navigate([pathName]);
} else {
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){
//When user has got access to Agenda but does not have their own calendar, goes to Agenda
if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){
this.router.navigate(['/home/agenda']);
}
else{
this.router.navigate(['/home/events']);
}
}
//If user has access permission to both Chat and Action, goes to Chat by default.
else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){
this.router.navigate(['/home/chat']);
}
else if(this.p.userPermission(this.p.permissionList.Actions.access)){
this.router.navigate(['/home/publications']);
}
this.FirstEnterService.enter()
}
}