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.empname = localStorage.getItem('emp-name');
this.logintype = localStorage.getItem('login-type'); this.logintype = localStorage.getItem('login-type');
// tslint:disable-next-line: radix // 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 // tslint:disable-next-line: triple-equals
if (remember == 'true') { this.remeberMe = true; } else { this.remeberMe = false; } if (remember == 'true') { this.remeberMe = true; } else { this.remeberMe = false; }
} }
@ -186,7 +195,13 @@ export class LoginComponent implements OnInit, OnDestroy {
public remeberMyInfo() { public remeberMyInfo() {
if (this.username) {localStorage.setItem('user', this.username); } if (this.username) {localStorage.setItem('user', this.username); }
if (this.password) {localStorage.setItem('password', this.password); } 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'); localStorage.setItem('remember', 'true');
} }
@ -359,7 +374,7 @@ export class LoginComponent implements OnInit, OnDestroy {
let anotherUser = this.sharedData.getSharedData('anotherUser'); let anotherUser = this.sharedData.getSharedData('anotherUser');
if(anotherUser){ if(anotherUser){
this.username = ''; this.username = '';
this.password = ''; this.password = '';
} }
console.log('login emit'); console.log('login emit');
console.log('login'); console.log('login');

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

Loading…
Cancel
Save