Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 43878d48 authored by Sebastian-Ion TINCU's avatar Sebastian-Ion TINCU
Browse files

Pull request #183: EDELIVERY-13873 Internationalization User Role Translation...

Pull request #183: EDELIVERY-13873 Internationalization User Role Translation is not Working Properly

Merge in EDELIVERY/smp from bugfix/EDELIVERY-13873-internationalization-user-role-translation-is-not-working-properly to development

* commit 'fcf38966':
  EDELIVERY-13873 Internationalization User Role Translation is not Working Properly
parents 64b4e79e fcf38966
No related branches found
No related tags found
No related merge requests found
Pipeline #221152 failed
......@@ -29,7 +29,8 @@ export class ToolbarComponent implements OnDestroy{
fullMenu: boolean = true;
userController: UserController;
currentUserRoleDescription = "";
private sub: Subscription;
private loginSubscription: Subscription;
private languageChangeSubscription: Subscription;
constructor(private alertService: AlertMessageService,
private securityService: SecurityService,
......@@ -41,11 +42,13 @@ export class ToolbarComponent implements OnDestroy{
private translateService: TranslateService) {
this.userController = new UserController(this.http, this.lookups, this.dialog);
this.sub = this.securityEventService.onLoginSuccessEvent().subscribe(async user => await this.updateCurrentUserRoleDescription());
this.loginSubscription = this.securityEventService.onLoginSuccessEvent().subscribe(async user => await this.updateCurrentUserRoleDescription());
this.languageChangeSubscription = this.translateService.onLangChange.subscribe(async langChangeEvent => await this.updateCurrentUserRoleDescription());
}
ngOnDestroy() {
this.sub.unsubscribe();
this.loginSubscription.unsubscribe();
this.languageChangeSubscription.unsubscribe();
}
clearWarning() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment