diff --git a/apps/client/src/app/components/home-overview/home-overview.component.ts b/apps/client/src/app/components/home-overview/home-overview.component.ts index b52850bc7..4c1eae0f9 100644 --- a/apps/client/src/app/components/home-overview/home-overview.component.ts +++ b/apps/client/src/app/components/home-overview/home-overview.component.ts @@ -49,7 +49,7 @@ export class GfHomeOverviewComponent implements OnInit { ); protected readonly errors = signal([]); - protected hasImpersonationId: boolean; + protected readonly hasImpersonationId = signal(false); protected hasPermissionToCreateActivity: boolean; protected historicalDataItems: LineChartItem[] | null; protected isLoadingPerformance = true; @@ -104,9 +104,7 @@ export class GfHomeOverviewComponent implements OnInit { .onChangeHasImpersonation() .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((impersonationId) => { - this.hasImpersonationId = !!impersonationId; - - this.changeDetectorRef.markForCheck(); + this.hasImpersonationId.set(!!impersonationId); }); this.layoutService.shouldReloadContent$ diff --git a/apps/client/src/app/components/home-overview/home-overview.html b/apps/client/src/app/components/home-overview/home-overview.html index c642c6f18..3ba1c14ff 100644 --- a/apps/client/src/app/components/home-overview/home-overview.html +++ b/apps/client/src/app/components/home-overview/home-overview.html @@ -2,7 +2,7 @@ class="align-items-center container d-flex flex-column h-100 justify-content-center overview p-0 position-relative" > @if ( - !hasImpersonationId && + !hasImpersonationId() && hasPermissionToCreateActivity && user?.activitiesCount === 0 ) {