Merge pull request #4158 from emanuelschuetze/username
Show username if full_name or last_name is empty.
This commit is contained in:
commit
07f65601e1
@ -87,11 +87,11 @@ export class User extends BaseModel<User> implements Searchable {
|
|||||||
shortName = `${title} ${shortName}`;
|
shortName = `${title} ${shortName}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return shortName;
|
return shortName || this.username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTitle(): string {
|
public getTitle(): string {
|
||||||
return this.full_name;
|
return this.full_name || this.username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getListViewTitle(): string {
|
public getListViewTitle(): string {
|
||||||
|
@ -43,7 +43,7 @@ export class ViewSpeaker extends BaseViewModel implements Selectable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public get name(): string {
|
public get name(): string {
|
||||||
return this.user.full_name;
|
return this.user.full_name || this.user.username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public constructor(speaker?: Speaker, user?: User) {
|
public constructor(speaker?: Speaker, user?: User) {
|
||||||
|
@ -36,11 +36,11 @@ export class ViewUser extends BaseProjectableModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public get full_name(): string {
|
public get full_name(): string {
|
||||||
return this.user ? this.user.full_name : null;
|
return this.user ? this.user.full_name || this.username : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get short_name(): string {
|
public get short_name(): string {
|
||||||
return this.user ? this.user.short_name : null;
|
return this.user ? this.user.short_name || this.username : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get email(): string {
|
public get email(): string {
|
||||||
|
Loading…
Reference in New Issue
Block a user