location eingebaut, back buttons angeglichen, paging & criteria korrigiert

This commit is contained in:
2024-08-08 17:25:00 +02:00
parent 7df5d32cc4
commit 69b0a83b1e
21 changed files with 196 additions and 328 deletions

View File

@@ -53,10 +53,10 @@ export class BrokerListingsComponent {
private route: ActivatedRoute,
private searchService: SearchService,
) {
this.criteria = getCriteriaStateObject('broker');
this.criteria = getCriteriaStateObject('brokerListings');
this.init();
this.searchService.currentCriteria.subscribe(criteria => {
if (criteria && criteria.criteriaType === 'broker') {
if (criteria && criteria.criteriaType === 'brokerListings') {
this.criteria = criteria as UserListingCriteria;
this.search();
}
@@ -74,6 +74,7 @@ export class BrokerListingsComponent {
this.users = usersReponse.results;
this.totalRecords = usersReponse.totalCount;
this.pageCount = this.totalRecords % LISTINGS_PER_PAGE === 0 ? this.totalRecords / LISTINGS_PER_PAGE : Math.floor(this.totalRecords / LISTINGS_PER_PAGE) + 1;
this.page = this.criteria.page ? this.criteria.page : 1;
this.cdRef.markForCheck();
this.cdRef.detectChanges();
}