mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
IMprove
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<ion-content class="text-white">
|
||||
|
||||
<div class="main-wrapper">
|
||||
<div class="wrapper" *ngIf="!hasSession && !setPin || loginPreference == 'none' && !setPin ">
|
||||
|
||||
|
||||
@@ -34,36 +34,34 @@ export class LoginPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public alertController: AlertController
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
// App has session
|
||||
if(!localStorage.getItem('UserData')) {
|
||||
this.hasSession = false
|
||||
} else {
|
||||
this.hasSession = true
|
||||
// this.router.navigate(['/home/events']);
|
||||
}
|
||||
// App has session
|
||||
if(!localStorage.getItem('UserData')) {
|
||||
this.hasSession = false
|
||||
} else {
|
||||
this.hasSession = true
|
||||
// this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||
|
||||
const loginPreference = userData?.loginPreference
|
||||
const pin = userData?.PIN
|
||||
const loginPreference = userData?.loginPreference
|
||||
const pin = userData?.PIN
|
||||
|
||||
if (pin) {
|
||||
this.hasPin = true
|
||||
} else {
|
||||
this.hasPin = false
|
||||
}
|
||||
if (pin) {
|
||||
this.hasPin = true
|
||||
} else {
|
||||
this.hasPin = false
|
||||
}
|
||||
|
||||
if (loginPreference) {
|
||||
this.loginPreference = loginPreference
|
||||
|
||||
} else {
|
||||
this.loginPreference = ''
|
||||
}
|
||||
if (loginPreference) {
|
||||
this.loginPreference = loginPreference
|
||||
} else {
|
||||
this.loginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -203,6 +201,7 @@ export class LoginPage implements OnInit {
|
||||
let userData: Object = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||
|
||||
userData['PIN'] = encrypted
|
||||
userData['loginPreference'] = 'none'
|
||||
|
||||
|
||||
localStorage.setItem('UserData', JSON.stringify(userData) )
|
||||
|
||||
Reference in New Issue
Block a user