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

This commit is contained in:
Peter Bastiani 2021-02-18 16:09:25 +01:00
parent f9ba4fd5e2
commit b537239c96

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) {