diff --git a/src/app/pages/login/login.page.html b/src/app/pages/login/login.page.html index c63aa3c63..45065d2a9 100644 --- a/src/app/pages/login/login.page.html +++ b/src/app/pages/login/login.page.html @@ -1,4 +1,5 @@ +
diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index d59e0bcad..be1c7aefd 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -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) )