1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

defining more abstractions

This commit is contained in:
Kyle Spearrin
2018-01-25 14:26:09 -05:00
parent e5c1adedff
commit 11755e409a
9 changed files with 111 additions and 45 deletions

View File

@@ -62,4 +62,25 @@ export class IdentityView implements View {
return this._subTitle;
}
get fullName(): string {
if (this.title != null || this.firstName != null || this.middleName != null || this.lastName != null) {
let name = '';
if (this.title != null) {
name += (this.title + ' ');
}
if (this.firstName != null) {
name += (this.firstName + ' ');
}
if (this.middleName != null) {
name += (this.middleName + ' ');
}
if (this.lastName != null) {
name += this.lastName;
}
return name.trim();
}
return null;
}
}