removed not needed 'showSystem' param

This commit is contained in:
Valentin 2021-11-12 10:18:35 +02:00
parent bb2c0bbc4e
commit e99a827370
4 changed files with 2 additions and 11 deletions

View File

@ -78,9 +78,8 @@
<div class="cell user-column">
<redaction-initials-avatar
[defaultValue]="'unknown' | translate"
[user]="dossierTemplate.createdBy"
[user]="dossierTemplate.createdBy || 'system'"
[withName]="true"
[showSystem]="true"
></redaction-initials-avatar>
</div>

View File

@ -4,7 +4,7 @@
[matTooltipPosition]="tooltipPosition"
[matTooltip]="userName"
>
{{ _user | name: { showInitials: true, showSystem: showSystem } }}
{{ _user | name: { showInitials: true } }}
</div>
<div *ngIf="withName" [class.disabled]="disabled" class="clamp-2 username">
{{ userName }}

View File

@ -16,7 +16,6 @@ export class InitialsAvatarComponent extends AutoUnsubscribe implements OnInit,
@Input() size: 'small' | 'large' = 'small';
@Input() withName = false;
@Input() showYou = false;
@Input() showSystem = false;
@Input() tooltipPosition: 'below' | 'above' = 'above';
@Input() defaultValue = this._translateService.instant('initials-avatar.unassigned');
colorClass: string;
@ -60,7 +59,6 @@ export class InitialsAvatarComponent extends AutoUnsubscribe implements OnInit,
if (this.color.includes('-')) {
return this.color;
}
return `${this.color}-dark`;
}
@ -81,7 +79,6 @@ export class InitialsAvatarComponent extends AutoUnsubscribe implements OnInit,
this.namePipeOptions = {
showYou: this.showYou,
defaultValue: this.defaultValue,
showSystem: this.showSystem,
};
}
}

View File

@ -18,7 +18,6 @@ function getInitials(name: string) {
export interface NamePipeOptions {
showYou?: boolean;
showInitials?: boolean;
showSystem?: boolean;
defaultValue?: string;
}
@ -33,10 +32,6 @@ export class NamePipe implements PipeTransform {
transform(value?: User | string, options = this._defaultOptions): string {
let name;
if (!value && options?.showSystem) {
value = 'system';
}
if (!value && options?.showInitials) {
return '?';
}