showInDirectory, loggingInterceptor, conditional Views props & profs

This commit is contained in:
2025-03-03 19:53:43 +01:00
parent d8c48bf58a
commit e37613ffa0
11 changed files with 52 additions and 20 deletions

View File

@@ -52,7 +52,8 @@ export class HomeComponent {
cityOrState = undefined;
private criteriaChangeSubscription: Subscription;
numberOfResults$: Observable<number>;
numberOfBroker$: Observable<number>;
numberOfCommercial$: Observable<number>;
aiSearch = false;
aiSearchText = '';
aiSearchFailed = false;
@@ -84,7 +85,8 @@ export class HomeComponent {
setTimeout(() => {
initFlowbite();
}, 0);
this.numberOfBroker$ = this.userService.getNumberOfBroker(createEmptyUserListingCriteria());
this.numberOfCommercial$ = this.listingService.getNumberOfListings(createEmptyCommercialPropertyListingCriteria(), 'commercialProperty');
const token = await this.authService.getToken();
sessionStorage.removeItem('businessListings');
sessionStorage.removeItem('commercialPropertyListings');
@@ -114,14 +116,7 @@ export class HomeComponent {
private setupCriteriaChangeListener() {
this.criteriaChangeSubscription = this.criteriaChangeService.criteriaChange$.pipe(untilDestroyed(this), debounceTime(400)).subscribe(() => this.setTotalNumberOfResults());
}
// login() {
// this.keycloakService.login({
// redirectUri: `${window.location.origin}/login${this.router.routerState.snapshot.url}`,
// });
// }
// register() {
// this.keycloakService.register({ redirectUri: `${window.location.origin}/account` });
// }
toggleMenu() {
this.isMenuOpen = !this.isMenuOpen;
}