AW-1881 Avatar based on first letters of firstname and lastname
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good Details

2022.01
Peter Bastiani 2021-02-18 16:09:25 +01:00
parent f9ba4fd5e2
commit b537239c96
1 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,10 @@ export class UserMenuComponent implements OnInit {
}
getLetter():string {
return this.user && this.user.name ? this.user.name.substr(0,1).toUpperCase():"";
if (this.user && this.user.firstName && this.user.lastName)
return this.user.firstName.substr(0,1).toUpperCase() +
this.user.lastName.substr(0,1).toUpperCase();
return this.user && this.user.name ? this.user.name.substr(0,1).toUpperCase():"";
}
logout(event:MouseEvent) {