diff options
author | Sri Balaji Marripud <sri.balaji.marripud@att.com> | 2020-08-18 16:52:50 -0400 |
---|---|---|
committer | Sri Balaji Marripud <sri.balaji.marripud@att.com> | 2020-08-18 16:52:59 -0400 |
commit | a209e51c8758828e6b6ddec4edcab8d3240adef5 (patch) | |
tree | 7dd2371b59ad9791c70296696a789b57ff1ed1ec /portal-FE-common | |
parent | d8a0539b3dfaa60bd9c809bcf801262b3ce282a4 (diff) |
Language support fix for portal
Issue-ID: PORTAL-975
Change-Id: I37eacb8e4a7604acf43191fa970ba8f141f0d384
Signed-off-by: Sri Balaji Marripud <sri.balaji.marripud@att.com>
Diffstat (limited to 'portal-FE-common')
-rw-r--r-- | portal-FE-common/src/app/layout/components/header/header.component.ts | 16 |
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; |