BugFixes: #8
This commit is contained in:
@@ -12,12 +12,13 @@ import { UserService } from '../../services/user.service';
|
||||
import { SharedModule } from '../../shared/shared/shared.module';
|
||||
import { resetBusinessListingCriteria, resetCommercialPropertyListingCriteria, resetUserListingCriteria } from '../../utils/utils';
|
||||
import { ValidatedCityComponent } from '../validated-city/validated-city.component';
|
||||
import { ValidatedPriceComponent } from '../validated-price/validated-price.component';
|
||||
import { ModalService } from './modal.service';
|
||||
@UntilDestroy()
|
||||
@Component({
|
||||
selector: 'app-search-modal',
|
||||
standalone: true,
|
||||
imports: [SharedModule, AsyncPipe, NgIf, NgSelectModule, ValidatedCityComponent],
|
||||
imports: [SharedModule, AsyncPipe, NgIf, NgSelectModule, ValidatedCityComponent, ValidatedPriceComponent],
|
||||
templateUrl: './search-modal.component.html',
|
||||
styleUrl: './search-modal.component.scss',
|
||||
})
|
||||
@@ -71,22 +72,6 @@ export class SearchModalComponent {
|
||||
}
|
||||
}
|
||||
}
|
||||
// private loadCities() {
|
||||
// this.cities$ = concat(
|
||||
// of([]), // default items
|
||||
// this.cityInput$.pipe(
|
||||
// distinctUntilChanged(),
|
||||
// tap(() => (this.cityLoading = true)),
|
||||
// switchMap(term =>
|
||||
// this.geoService.findCitiesStartingWith(term).pipe(
|
||||
// catchError(() => of([])), // empty list on error
|
||||
// // map(cities => cities.map(city => city.city)), // transform the list of objects to a list of city names
|
||||
// tap(() => (this.cityLoading = false)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
private loadCounties() {
|
||||
this.counties$ = concat(
|
||||
of([]), // default items
|
||||
@@ -169,4 +154,13 @@ export class SearchModalComponent {
|
||||
close() {
|
||||
this.modalService.reject(this.backupCriteria);
|
||||
}
|
||||
onCheckboxChange(checkbox: string, value: boolean) {
|
||||
// Deaktivieren Sie alle Checkboxes
|
||||
(<BusinessListingCriteria>this.criteria).realEstateChecked = false;
|
||||
(<BusinessListingCriteria>this.criteria).leasedLocation = false;
|
||||
(<BusinessListingCriteria>this.criteria).franchiseResale = false;
|
||||
|
||||
// Aktivieren Sie nur die aktuell ausgewählte Checkbox
|
||||
this.criteria[checkbox] = value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user