From 7d336f975d26ed259f0b2bc2037290ebdb3e4ff8 Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Wed, 23 Jul 2025 19:11:45 -0500 Subject: [PATCH] fixed error for mobile version --- .../search-modal/search-modal.component.html | 340 ++++++++---------- .../search-modal/search-modal.component.ts | 6 + .../business-listings.component.ts | 5 +- 3 files changed, 167 insertions(+), 184 deletions(-) diff --git a/bizmatch/src/app/components/search-modal/search-modal.component.html b/bizmatch/src/app/components/search-modal/search-modal.component.html index 1332ffc..cec1fb2 100644 --- a/bizmatch/src/app/components/search-modal/search-modal.component.html +++ b/bizmatch/src/app/components/search-modal/search-modal.component.html @@ -1,15 +1,15 @@
-
+
@if(criteria.criteriaType==='businessListings') { -

Business Listing Search

+

Business Listing Search

} @else if (criteria.criteriaType==='commercialPropertyListings') {

Property Listing Search

} @else {

Professional Listing Search

} -
-
-
-
-
- - -
-
- -
-
- -
- - -
-
-
- -
- @for (radius of [5, 20, 50, 100, 200, 300, 400, 500]; track radius) { - - } -
-
-
- -
- - - - -
-
-
- -
- - - - -
-
-
- -
- - - - -
-
-
- - -
-
- - -
-
- - -
-
- -
- - - - -
-
-
- -
- - - - -
-
-
- - -
-
-
- -
-
+
State: {{ criteria.state }} @@ -222,19 +58,161 @@ Broker: {{ criteria.brokerName }}
-
- -
- - +
+
+
+ + +
+
+ +
+
+ +
+ + +
+
+
+ +
+ @for (radius of [5, 20, 50, 100, 200, 300, 400, 500]; track radius) { + + } +
+
+
+ +
+ + - + +
+
+
+ +
+ + - + +
+
+
+ +
+ + - + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + - + +
+
+
+ +
+ + - + +
+
+
+ + +
+
+
diff --git a/bizmatch/src/app/components/search-modal/search-modal.component.ts b/bizmatch/src/app/components/search-modal/search-modal.component.ts index d421da1..b8c4bb8 100644 --- a/bizmatch/src/app/components/search-modal/search-modal.component.ts +++ b/bizmatch/src/app/components/search-modal/search-modal.component.ts @@ -73,6 +73,7 @@ export class SearchModalComponent { // this.loadCities(); this.loadCounties(); this.updateSelectedPropertyType(); + this.modalService.sendCriteria(this.criteria); } hasActiveFilters(): boolean { return !!( @@ -241,6 +242,11 @@ export class SearchModalComponent { closeModal() { console.log('Closing modal'); } + closeAndSearch() { + this.modalService.accept(); + this.searchService.search(this.criteria); + this.close(); + } isTypeOfBusinessClicked(v: KeyValueStyle) { return this.criteria.types.find(t => t === v.value); } diff --git a/bizmatch/src/app/pages/listings/business-listings/business-listings.component.ts b/bizmatch/src/app/pages/listings/business-listings/business-listings.component.ts index dc12c90..0a740b9 100644 --- a/bizmatch/src/app/pages/listings/business-listings/business-listings.component.ts +++ b/bizmatch/src/app/pages/listings/business-listings/business-listings.component.ts @@ -113,9 +113,8 @@ export class BusinessListingsComponent { // Open the search modal with current criteria const modalResult = await this.modalService.showModal(this.criteria); if (modalResult.accepted) { - this.searchService.search(this.criteria); - } else { - this.criteria = assignProperties(this.criteria, modalResult.criteria); + this.criteria = assignProperties(this.criteria, modalResult.criteria); // Update criteria with modal result + this.searchService.search(this.criteria); // Trigger search with updated criteria } } }