Enhancement for accounting view in back button (#1618)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-01-02 23:40:47 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent da5d1371e6
commit 9d19d1b061
10 changed files with 29 additions and 17 deletions
+11 -6
View File
@@ -29,6 +29,7 @@ export class ClientsComponent implements OnInit {
constructor(private searchService: SearchService) { }
ngOnInit() {
this.getClients('');
}
/**
@@ -44,12 +45,16 @@ export class ClientsComponent implements OnInit {
*/
search(value: string) {
if (value !== '') {
this.searchService.getSearchResults(value, 'clients').subscribe((data: any) => {
this.dataSource = new MatTableDataSource(data);
this.existsClientsToFilter = (data.length > 0);
this.notExistsClientsToFilter = !this.existsClientsToFilter;
this.moreClientsToFilter = (data.length > 50);
});
this.getClients(value);
}
}
private getClients(value: string) {
this.searchService.getSearchResults(value, 'clients').subscribe((data: any) => {
this.dataSource = new MatTableDataSource(data);
this.existsClientsToFilter = (data.length > 0);
this.notExistsClientsToFilter = !this.existsClientsToFilter;
this.moreClientsToFilter = (data.length > 50);
});
}
}