show all listings, Bug Fixes

This commit is contained in:
2024-05-09 16:10:01 +02:00
parent 6b61c19bd7
commit d508415de4
29 changed files with 810 additions and 410 deletions

View File

@@ -18,7 +18,7 @@ import { ImageService } from '../../../services/image.service';
import { ListingsService } from '../../../services/listings.service';
import { SelectOptionsService } from '../../../services/select-options.service';
import { UserService } from '../../../services/user.service';
import { createGenericObject, getCriteriaStateObject, getSessionStorageHandler } from '../../../utils/utils';
import { getCriteriaStateObject, getSessionStorageHandler, resetCriteria } from '../../../utils/utils';
@Component({
selector: 'app-broker-listings',
@@ -54,14 +54,13 @@ export class BrokerListingsComponent {
private router: Router,
private cdRef: ChangeDetectorRef,
private imageService: ImageService,
private route: ActivatedRoute,
) {
this.criteria = onChange(getCriteriaStateObject(), getSessionStorageHandler);
this.criteria.type = undefined;
this.router.getCurrentNavigation();
this.activatedRoute.snapshot;
this.activatedRoute.params.subscribe(params => {
if (this.activatedRoute.snapshot.fragment === '') {
this.criteria = onChange(createGenericObject<ListingCriteria>(), getSessionStorageHandler);
this.route.data.subscribe(async () => {
if (!this.router.getCurrentNavigation().extras.state) {
resetCriteria(this.criteria);
}
this.init();
});