[SM-586] add search to Service Accounts list (#4923)

This commit is contained in:
Will Martin 2023-03-07 10:25:59 -05:00 committed by GitHub
parent 4f64ac87de
commit 6876aad883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -24,6 +24,11 @@ export class ServiceAccountsListComponent implements OnDestroy {
}
private _serviceAccounts: ServiceAccountView[];
@Input()
set search(search: string) {
this.dataSource.filter = search;
}
@Output() newServiceAccountEvent = new EventEmitter();
@Output() deleteServiceAccountsEvent = new EventEmitter<ServiceAccountView[]>();
@Output() onServiceAccountCheckedEvent = new EventEmitter<string[]>();

View File

@ -1,9 +1,10 @@
<sm-header>
<input bitInput [placeholder]="'searchServiceAccounts' | i18n" />
<input bitInput [placeholder]="'searchServiceAccounts' | i18n" [(ngModel)]="search" />
<sm-new-menu></sm-new-menu>
</sm-header>
<sm-service-accounts-list
[serviceAccounts]="serviceAccounts$ | async"
(newServiceAccountEvent)="openNewServiceAccountDialog()"
(deleteServiceAccountsEvent)="openDeleteDialog($event)"
[search]="search"
></sm-service-accounts-list>

View File

@ -22,7 +22,8 @@ import { ServiceAccountService } from "./service-account.service";
templateUrl: "./service-accounts.component.html",
})
export class ServiceAccountsComponent implements OnInit {
serviceAccounts$: Observable<ServiceAccountView[]>;
protected serviceAccounts$: Observable<ServiceAccountView[]>;
protected search: string;
private organizationId: string;