show all listings, Bug Fixes
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div class="col-2">
|
||||
<p-inputGroup>
|
||||
<input id="name" type="text" pInputText [(ngModel)]="criteria.name" placeholder="Name" />
|
||||
<button type="button" pButton icon="pi pi-times" class="p-button-danger" (click)="reset()"></button>
|
||||
<button type="button" pButton icon="pi pi-times" class="p-button-secondary" (click)="reset()"></button>
|
||||
</p-inputGroup>
|
||||
</div>
|
||||
<div class="col-1 col-offset-7">
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user