diverse BugFixes
This commit is contained in:
@@ -154,6 +154,7 @@
|
||||
<li>
|
||||
<a routerLink="/account" (click)="closeDropdown()" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white">Account</a>
|
||||
</li>
|
||||
@if(user.customerType==='professional' || isAdmin()){
|
||||
<li>
|
||||
<a routerLink="/createBusinessListing" (click)="closeDropdown()" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
|
||||
>Create Listing</a
|
||||
@@ -162,6 +163,7 @@
|
||||
<li>
|
||||
<a routerLink="/myListings" (click)="closeDropdown()" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white">My Listings</a>
|
||||
</li>
|
||||
}
|
||||
<li>
|
||||
<a routerLink="/emailUs" (click)="closeDropdown()" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white">EMail Us</a>
|
||||
</li>
|
||||
|
||||
@@ -82,40 +82,6 @@ export class HeaderComponent {
|
||||
this.criteria = getCriteriaProxy(this.baseRoute, this);
|
||||
this.searchService.search(this.criteria);
|
||||
}
|
||||
// getCriteriaProxy(path:string):BusinessListingCriteria | CommercialPropertyListingCriteria | UserListingCriteria{
|
||||
// if ('businessListings' === path) {
|
||||
// return this.createEnhancedProxy(getCriteriaStateObject('business'));
|
||||
// } else if ('commercialPropertyListings' === path) {
|
||||
// return this.createEnhancedProxy(getCriteriaStateObject('commercialProperty'));
|
||||
// } else if ('brokerListings' === path) {
|
||||
// return this.createEnhancedProxy(getCriteriaStateObject('broker'));
|
||||
// } else {
|
||||
// return undefined;
|
||||
// }
|
||||
// }
|
||||
// private createEnhancedProxy(obj: any) {
|
||||
// const component = this;
|
||||
|
||||
// const sessionStorageHandler = function (path, value, previous, applyData) {
|
||||
// let criteriaType = '';
|
||||
// if ('/businessListings' === window.location.pathname) {
|
||||
// criteriaType = 'business';
|
||||
// } else if ('/commercialPropertyListings' === window.location.pathname) {
|
||||
// criteriaType = 'commercialProperty';
|
||||
// } else if ('/brokerListings' === window.location.pathname) {
|
||||
// criteriaType = 'broker';
|
||||
// }
|
||||
// sessionStorage.setItem(`${criteriaType}_criteria`, JSON.stringify(this));
|
||||
// };
|
||||
|
||||
// return onChange(obj, function (path, value, previous, applyData) {
|
||||
// // Call the original sessionStorageHandler
|
||||
// sessionStorageHandler.call(this, path, value, previous, applyData);
|
||||
|
||||
// // Notify about the criteria change using the component's context
|
||||
// component.criteriaChangeService.notifyCriteriaChange();
|
||||
// });
|
||||
// }
|
||||
|
||||
ngAfterViewInit() {}
|
||||
|
||||
@@ -183,4 +149,7 @@ export class HeaderComponent {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
isAdmin() {
|
||||
return this.keycloakService.getUserRoles(true).includes('ADMIN');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user