new session service

This commit is contained in:
Peter Maquiran
2023-07-10 12:32:01 +01:00
parent 9676bab7eb
commit f6f61a11ca
13 changed files with 116 additions and 71 deletions
+3 -4
View File
@@ -19,7 +19,7 @@ import { Platform } from '@ionic/angular';
import { FirstEnterService } from '../../services/first-enter.service';
import { Storage } from '@ionic/storage';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { DocumentManagementStore } from 'src/app/store/documentManagement';
import { CPSession } from 'src/app/store/documentManagement';
@Component({
selector: 'app-login',
templateUrl: './login.page.html',
@@ -39,7 +39,6 @@ export class LoginPage implements OnInit {
sessionStore = SessionStore;
showPassword = false;
passwordIcon = "eye";
DocumentManagementStore = DocumentManagementStore
constructor(
private notificatinsservice: NotificationsService,
@@ -119,7 +118,7 @@ export class LoginPage implements OnInit {
const loader = this.toastService.loading()
let attempt = await this.authService.login(this.userattempt, {saveSession: false})
await this.authService.loginContenteProduction(this.userattempt, {saveSession: false})
await this.authService.loginContenteProduction(this.userattempt, {saveSession: true})
loader.remove()
@@ -154,7 +153,7 @@ export class LoginPage implements OnInit {
window.localStorage.clear();
await MessageModel.deleteAll();
await DeleteMessageModel.deleteAll();
this.DocumentManagementStore.clear();
CPSession.clear();
this.storage.clear();
await this.authService.SetSession(attempt, this.userattempt);