Browse Source

feat(client): convert hasImpersonationId to signal

pull/6927/head
KenTandrian 2 days ago
parent
commit
55306aa890
  1. 6
      apps/client/src/app/components/home-overview/home-overview.component.ts
  2. 2
      apps/client/src/app/components/home-overview/home-overview.html

6
apps/client/src/app/components/home-overview/home-overview.component.ts

@ -49,7 +49,7 @@ export class GfHomeOverviewComponent implements OnInit {
);
protected readonly errors = signal<AssetProfileIdentifier[]>([]);
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$

2
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
) {

Loading…
Cancel
Save