mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
new session service
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user