Add datatable step when exist entity datatable checks (#1633)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-01-05 11:58:16 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent cafe8fa73d
commit 3a3d96222e
14 changed files with 70 additions and 191 deletions
+3 -1
View File
@@ -17,7 +17,7 @@ import { environment } from 'environments/environment';
export class ClientsComponent implements OnInit {
@ViewChild('showClosedAccounts', { static: true }) showClosedAccounts: MatCheckbox;
displayedColumns = ['name', 'clientNo', 'externalId', 'status', 'office', 'staff'];
displayedColumns = ['entityName', 'entityAccountNo', 'entityExternalId', 'status', 'parentName', 'staffName'];
dataSource: MatTableDataSource<any>;
existsClientsToFilter = false;
@@ -55,6 +55,8 @@ export class ClientsComponent implements OnInit {
private getClients(value: string) {
this.searchService.getSearchResults(value, 'clients').subscribe((data: any) => {
this.dataSource = new MatTableDataSource(data);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
this.existsClientsToFilter = (data.length > 0);
this.notExistsClientsToFilter = !this.existsClientsToFilter;
this.moreClientsToFilter = (data.length > 50);