summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2020-08-18 22:03:58 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-18 22:03:58 +0000
commita384f21b2b9dd1391ec25cd0c6dc1e48f55c7d90 (patch)
treec939d75b7898d085e05eaa5bffef715c8519d90d
parentdb8f1bde5d4ec666321c2bca099c5b3668c8524a (diff)
parenta209e51c8758828e6b6ddec4edcab8d3240adef5 (diff)
Merge "Language support fix for portal"
-rw-r--r--portal-FE-common/src/app/layout/components/header/header.component.ts16
1 files changed, 10 insertions, 6 deletions
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 f09c772e..7a8e7095 100644
--- 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.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);
}
-
- 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);
- }) ;
+ }) ;
});
});
}
@@ -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.getLanguageInfo();
}
if(res != null && res.isSystemUser === 'true'){
this.isSystemUser = true;