showInDirectory, loggingInterceptor, conditional Views props & profs
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
>Businesses</a
|
||||
>
|
||||
</li>
|
||||
@if ((numberOfCommercial$ | async) > 0) {
|
||||
<li class="me-2">
|
||||
<a
|
||||
(click)="changeTab('commercialProperty')"
|
||||
@@ -68,6 +69,8 @@
|
||||
>Properties</a
|
||||
>
|
||||
</li>
|
||||
}
|
||||
@if ((numberOfBroker$ | async) > 0) {
|
||||
<li class="me-2">
|
||||
<a
|
||||
(click)="changeTab('broker')"
|
||||
@@ -80,6 +83,7 @@
|
||||
>Professionals</a
|
||||
>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
} @if(aiSearch){
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -220,6 +220,16 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="flex items-center !my-8">
|
||||
<label class="flex items-center cursor-pointer">
|
||||
<div class="relative">
|
||||
<input type="checkbox" [(ngModel)]="user.showInDirectory" name="showInDirectory" class="hidden" />
|
||||
<div class="toggle-bg block w-12 h-6 rounded-full bg-gray-600 transition"></div>
|
||||
</div>
|
||||
<div class="ml-3 text-gray-700 font-medium">Show your profile in Professional Directory</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-start">
|
||||
<button type="submit" class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" (click)="updateProfile(user)">
|
||||
Update Profile
|
||||
|
||||
Reference in New Issue
Block a user