new images, tailwindcss 4

This commit is contained in:
2025-04-05 23:22:25 +02:00
parent 83808263af
commit 7d64ee11bf
28 changed files with 163 additions and 87 deletions

View File

@@ -49,6 +49,7 @@ export class HeaderComponent {
sortByOptions: KeyValueAsSortBy[] = [];
numberOfBroker$: Observable<number>;
numberOfCommercial$: Observable<number>;
userMenuVisible: boolean = false;
constructor(
private router: Router,
private userService: UserService,
@@ -68,7 +69,19 @@ export class HeaderComponent {
this.sortDropdownVisible = false;
}
}
@HostListener('document:click', ['$event'])
handleOutsideClick(event: Event) {
const target = event.target as HTMLElement;
// Schließe das User-Menü, wenn außerhalb geklickt wird
if (this.userMenuVisible && !target.closest('#user-menu-button') && !target.closest('#user-menu-dropdown')) {
this.userMenuVisible = false;
}
}
async ngOnInit() {
this.router.events.subscribe(event => {
if (event instanceof NavigationEnd) {
}
});
const token = await this.authService.getToken();
this.keycloakUser = map2User(token);
if (this.keycloakUser) {
@@ -194,6 +207,9 @@ export class HeaderComponent {
toggleSortDropdown() {
this.sortDropdownVisible = !this.sortDropdownVisible;
}
toggleUserMenu() {
this.userMenuVisible = !this.userMenuVisible;
}
get isProfessional() {
return this.user?.customerType === 'professional';
}