fix placeholder and lang issue

mekawy-issues
enadhilal 6 years ago
parent 0d83f70fde
commit 432c95ab1b

@ -141,7 +141,16 @@ export class LoginComponent implements OnInit, OnDestroy {
this.empname = localStorage.getItem('emp-name');
this.logintype = localStorage.getItem('login-type');
// tslint:disable-next-line: radix
this.currentLang = parseInt(localStorage.getItem('lang'));
let isEng = localStorage.getItem('lang')
if(isEng){
this.currentLang = 2;
this.language = "US";
this.changeLanguage('2')
}else{
this.currentLang = 1;
this.language = "AR";
this.changeLanguage('1')
}
// tslint:disable-next-line: triple-equals
if (remember == 'true') { this.remeberMe = true; } else { this.remeberMe = false; }
}
@ -186,7 +195,13 @@ 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()); }
if (this.currentLang) {
if(this.currentLang === 1){
localStorage.setItem('lang', 'ar');
}else{
localStorage.setItem('lang', 'en');
}
}
localStorage.setItem('remember', 'true');
}
@ -359,7 +374,7 @@ export class LoginComponent implements OnInit, OnDestroy {
let anotherUser = this.sharedData.getSharedData('anotherUser');
if(anotherUser){
this.username = '';
this.password = '';
this.password = '';
}
console.log('login emit');
console.log('login');

@ -159,8 +159,8 @@
"ar":"Verify its you"
},
"check-user-text1":{
"en":"Please Enter your Employee ID, A ",
"ar":"يرجى ادخال رقم الموظف "
"en":"Employee ID",
"ar":"رقم الموظف "
},
"check-user-text2":{
"en":"login Code ",

Loading…
Cancel
Save