Merge branch 'develop_bitOut' into consoleCle

This commit is contained in:
Peter Maquiran
2022-12-20 17:16:55 +01:00
23 changed files with 293 additions and 238 deletions
+9 -1
View File
@@ -16,6 +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 { SqliteService } from 'src/app/services/sqlite.service';
@@ -53,6 +54,7 @@ export class LoginPage implements OnInit {
public ChatSystemService: ChatSystemService,
private ChatService: ChatService,
private platform: Platform,
private sqliteservice: SqliteService,
) {}
ngOnInit() {
@@ -141,6 +143,7 @@ export class LoginPage implements OnInit {
} else {
this.sqliteservice.deleteAllTables();
this.RochetChatConnectorService.logout();
this.clearStoreService.clear();
this.ChatSystemService.clearChat();
@@ -163,7 +166,12 @@ export class LoginPage implements OnInit {
this.getToken();
if(!this.platform.is('desktop') && !this.platform.is('mobileweb')) {
this.router.navigateByUrl('/pin', { replaceUrl: true });
if(this.sessionStore.hasPin) {
this.router.navigateByUrl('/home/events');
} else {
this.router.navigateByUrl('/pin', { replaceUrl: true });
}
} else {
this.router.navigateByUrl('/home/events');
}