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 readonly errors = signal<AssetProfileIdentifier[]>([]);
protected hasImpersonationId: boolean; protected readonly hasImpersonationId = signal(false);
protected hasPermissionToCreateActivity: boolean; protected hasPermissionToCreateActivity: boolean;
protected historicalDataItems: LineChartItem[] | null; protected historicalDataItems: LineChartItem[] | null;
protected isLoadingPerformance = true; protected isLoadingPerformance = true;
@ -104,9 +104,7 @@ export class GfHomeOverviewComponent implements OnInit {
.onChangeHasImpersonation() .onChangeHasImpersonation()
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((impersonationId) => { .subscribe((impersonationId) => {
this.hasImpersonationId = !!impersonationId; this.hasImpersonationId.set(!!impersonationId);
this.changeDetectorRef.markForCheck();
}); });
this.layoutService.shouldReloadContent$ 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" class="align-items-center container d-flex flex-column h-100 justify-content-center overview p-0 position-relative"
> >
@if ( @if (
!hasImpersonationId && !hasImpersonationId() &&
hasPermissionToCreateActivity && hasPermissionToCreateActivity &&
user?.activitiesCount === 0 user?.activitiesCount === 0
) { ) {

Loading…
Cancel
Save