diff --git a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.html b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.html index 8848b48d4..85fb970cf 100644 --- a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.html +++ b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.html @@ -224,24 +224,29 @@ } } - @if (hasStatsAccess) { -
  • - - @if (shouldShowStatsMenu) { - - } -
  • + @if (userService.userState$ | async; as statsUserState) { + @if (statsUserState.user?.permissions?.canAccessLibraryStats || statsUserState.user?.permissions?.admin) { +
  • + +
  • + } + @if (statsUserState.user?.permissions?.canAccessUserStats || statsUserState.user?.permissions?.admin) { +
  • + +
  • + } } @if (userService.userState$ | async; as userState) { @if (userState.user?.permissions?.canManageLibrary || userState.user?.permissions?.admin) { diff --git a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.ts b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.ts index d2a449b3d..64e8f88ad 100644 --- a/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.ts +++ b/booklore-ui/src/app/shared/layout/component/layout-topbar/app.topbar.component.ts @@ -62,7 +62,6 @@ export class AppTopBarComponent implements OnDestroy { @ViewChild('topbarmenubutton') topbarMenuButton!: ElementRef; @ViewChild('topbarmenu') menu!: ElementRef; @ViewChild('statsMenu') statsMenu: any; - @ViewChild('statsMenuMobile') statsMenuMobile: any; isMenuVisible = true; progressHighlight = false;