images based on http-server, filter dropdowns

This commit is contained in:
2024-05-10 17:19:36 +02:00
parent d508415de4
commit 5230ef1230
21 changed files with 224 additions and 149 deletions

View File

@@ -70,7 +70,7 @@ export class BusinessListingsComponent {
this.criteria = onChange(getCriteriaStateObject(), getSessionStorageHandler);
this.criteria.type = undefined;
this.route.data.subscribe(async () => {
if (!this.router.getCurrentNavigation().extras.state) {
if (this.router.getCurrentNavigation().extras.state) {
resetCriteria(this.criteria);
}
this.init();
@@ -79,7 +79,7 @@ export class BusinessListingsComponent {
async ngOnInit() {}
async init() {
const statesResult = await this.listingsService.getAllStates('business');
this.states = statesResult.map(s => s.state).map(ls => ({ name: this.selectOptions.getState(ls as string), value: ls }));
this.states = statesResult.map(ls => ({ name: this.selectOptions.getState(ls.state as string), value: ls.state, count: ls.count }));
this.search();
}
refine() {