Skip to content

Commit

Permalink
Merge pull request #2407 from sap-labs-france/master-qa
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Benoit authored May 19, 2021
2 parents e9e9d24 + 85d0c37 commit 56cff27
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/pages/users/user-sites/user-sites-dialog.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { TranslateService } from '@ngx-translate/core';
import { DialogParams } from '../../../types/Authorization';

import { User } from '../../../types/User';
import { Users } from '../../../utils/Users';
Expand All @@ -19,10 +20,10 @@ export class UserSitesDialogComponent {
public userSitesTableDataSource: UserSitesTableDataSource,
private translateService: TranslateService,
private dialogRef: MatDialogRef<UserSitesDialogComponent>,
@Inject(MAT_DIALOG_DATA) data: User) {
if (data) {
this.userSitesTableDataSource.setUser(data);
this.dialogTitle = this.translateService.instant('users.assigned_sites_to_user', {userName: Users.buildUserFullName(data) });
@Inject(MAT_DIALOG_DATA) { dialogData }: DialogParams<User>) {
if (dialogData) {
this.userSitesTableDataSource.setUser(dialogData);
this.dialogTitle = this.translateService.instant('users.assigned_sites_to_user', {userName: Users.buildUserFullName(dialogData) });
} else {
this.dialogTitle = this.translateService.instant('users.sites');
}
Expand Down

0 comments on commit 56cff27

Please sign in to comment.