diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts index 08179d5e..734c72a5 100644 --- a/Mohem/src/app/authentication/login/login.component.ts +++ b/Mohem/src/app/authentication/login/login.component.ts @@ -140,6 +140,8 @@ export class LoginComponent implements OnInit, OnDestroy { const remember = localStorage.getItem('remember'); // ****// this.empname = localStorage.getItem('emp-name'); this.logintype = localStorage.getItem('login-type'); + // tslint:disable-next-line: radix + this.currentLang = parseInt(localStorage.getItem('lang')); // tslint:disable-next-line: triple-equals if (remember == 'true') { this.remeberMe = true; } else { this.remeberMe = false; } } @@ -184,6 +186,7 @@ export class LoginComponent implements OnInit, OnDestroy { public remeberMyInfo() { if (this.username) {localStorage.setItem('user', this.username); } if (this.password) {localStorage.setItem('password', this.password); } + if (this.currentLang) {localStorage.setItem('lang', this.currentLang.toString()); } localStorage.setItem('remember', 'true'); } @@ -353,6 +356,11 @@ export class LoginComponent implements OnInit, OnDestroy { } login() { + let anotherUser = this.sharedData.getSharedData('anotherUser'); + if(anotherUser){ + this.username = ''; + this.password = ''; + } console.log('login emit'); console.log('login'); // this.checkUserAuthentication(); diff --git a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.html b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.html index 554414ee..9f4f7175 100644 --- a/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.html +++ b/Mohem/src/app/hmg-common/ui/stats-button/stats-button.component.html @@ -1,4 +1,4 @@ -