Code Review
/
portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Language support fix for portal
[portal.git]
/
portal-FE-common
/
src
/
app
/
layout
/
components
/
header
/
header.component.ts
diff --git
a/portal-FE-common/src/app/layout/components/header/header.component.ts
b/portal-FE-common/src/app/layout/components/header/header.component.ts
index
f09c772
..
7a8e709
100644
(file)
--- a/
portal-FE-common/src/app/layout/components/header/header.component.ts
+++ b/
portal-FE-common/src/app/layout/components/header/header.component.ts
@@
-92,17
+92,20
@@
export class HeaderComponent implements OnInit {
this.brandLogoImagePath = this.api.brandLogoImagePath;
}
this.brandLogoImagePath = this.api.brandLogoImagePath;
}
- this.menusService.getAllLanguages().subscribe(data =>{
- this.result = data;
+ }
+
+ getLanguageInfo() {
+ this.menusService.getAllLanguages().subscribe(data =>{
+ this.result = data;
for(let lang of this.result.languageList ){
this.languages.push(lang);
}
for(let lang of this.result.languageList ){
this.languages.push(lang);
}
-
- this.menusService.getCurrentLang(this.loginSnippetUserid).subscribe(data=>{
- this.result = data;
+
+
this.menusService.getCurrentLang(this.loginSnippetUserid).subscribe(data=>{
+
this.result = data;
this.languages.map((obj:any)=>{
obj.selected = obj.languageId == parseInt(this.result.languageId);
this.languages.map((obj:any)=>{
obj.selected = obj.languageId == parseInt(this.result.languageId);
- }) ;
+ }) ;
});
});
}
});
});
}
@@
-123,6
+126,7
@@
export class HeaderComponent implements OnInit {
this.loginSnippetEmail = res.email;
this.loginSnippetUserid = res.userId;
this.lastLogin = Date.parse(res.last_login);
this.loginSnippetEmail = res.email;
this.loginSnippetUserid = res.userId;
this.lastLogin = Date.parse(res.last_login);
+ this.getLanguageInfo();
}
if(res != null && res.isSystemUser === 'true'){
this.isSystemUser = true;
}
if(res != null && res.isSystemUser === 'true'){
this.isSystemUser = true;