AW-1881 Avatar based on first letters of firstname and lastname
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
f9ba4fd5e2
commit
b537239c96
@ -21,6 +21,9 @@ export class UserMenuComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getLetter():string {
|
getLetter():string {
|
||||||
|
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():"";
|
return this.user && this.user.name ? this.user.name.substr(0,1).toUpperCase():"";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user