feat: Added user search component. Resolves #15

This commit is contained in:
2025-06-01 13:54:47 +02:00
parent 3b56d40d5a
commit 94702834b4
5 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<mat-form-field>
<mat-label *ngIf="label">{{label}}</mat-label>
<input matInput type="text" [matAutocomplete]="ac" [formControl]="control" #inputComponent>
</mat-form-field>
<mat-spinner color="accent" diameter="32" *ngIf="loading"></mat-spinner>
<mat-autocomplete #ac="matAutocomplete" autoActiveFirstOption (optionSelected)="saveValue($event)" [displayWith]="displayFn">
@for (item of list; track $index) {
<mat-option [value]="item">
@if (item.fname) {
{{item.fname}} {{item.surname}} <span *ngIf="item.room" class="room">({{item.room}})</span>
} @else {
{{item.uname}}
}
</mat-option>
}
</mat-autocomplete>