Browse Source

feat(client): replace constructor based DI with inject function

pull/6934/head
KenTandrian 2 days ago
parent
commit
e809158899
  1. 23
      apps/client/src/app/components/user-account-access/user-account-access.component.ts

23
apps/client/src/app/components/user-account-access/user-account-access.component.ts

@ -14,6 +14,7 @@ import {
Component, Component,
CUSTOM_ELEMENTS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA,
DestroyRef, DestroyRef,
inject,
OnInit OnInit
} from '@angular/core'; } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@ -73,17 +74,17 @@ export class GfUserAccountAccessComponent implements OnInit {
}); });
public user: User; public user: User;
public constructor( private readonly changeDetectorRef = inject(ChangeDetectorRef);
private changeDetectorRef: ChangeDetectorRef, private readonly dataService = inject(DataService);
private dataService: DataService, private readonly destroyRef = inject(DestroyRef);
private destroyRef: DestroyRef, private readonly deviceDetectorService = inject(DeviceDetectorService);
private deviceDetectorService: DeviceDetectorService, private readonly dialog = inject(MatDialog);
private dialog: MatDialog, private readonly notificationService = inject(NotificationService);
private notificationService: NotificationService, private readonly route = inject(ActivatedRoute);
private route: ActivatedRoute, private readonly router = inject(Router);
private router: Router, private readonly userService = inject(UserService);
private userService: UserService
) { public constructor() {
const { globalPermissions } = this.dataService.fetchInfo(); const { globalPermissions } = this.dataService.fetchInfo();
this.hasPermissionToDeleteAccess = hasPermission( this.hasPermissionToDeleteAccess = hasPermission(

Loading…
Cancel
Save