Browse Source

feat(client): enforce immutability

pull/6913/head
KenTandrian 6 days ago
parent
commit
7db2719d28
  1. 55
      apps/client/src/app/components/header/header.component.ts

55
apps/client/src/app/components/header/header.component.ts

@ -84,7 +84,7 @@ export class GfHeaderComponent implements OnChanges {
@Input() public pageTitle: string; @Input() public pageTitle: string;
@Input() public user: User; @Input() public user: User;
@Output() public signOut = new EventEmitter<void>(); @Output() public readonly signOut = new EventEmitter<void>();
@ViewChild('assistant') protected assistantElement: GfAssistantComponent; @ViewChild('assistant') protected assistantElement: GfAssistantComponent;
@ViewChild('assistantTrigger') @ViewChild('assistantTrigger')
@ -101,35 +101,36 @@ export class GfHeaderComponent implements OnChanges {
protected hasPermissionToAccessFearAndGreedIndex: boolean; protected hasPermissionToAccessFearAndGreedIndex: boolean;
protected hasPermissionToCreateUser: boolean; protected hasPermissionToCreateUser: boolean;
protected impersonationId: string; protected impersonationId: string;
protected internalRoutes = internalRoutes; protected readonly internalRoutes = internalRoutes;
protected isMenuOpen: boolean; protected isMenuOpen: boolean;
protected routeAbout = publicRoutes.about.path; protected readonly routeAbout = publicRoutes.about.path;
protected routeFeatures = publicRoutes.features.path; protected readonly routeFeatures = publicRoutes.features.path;
protected routeMarkets = publicRoutes.markets.path; protected readonly routeMarkets = publicRoutes.markets.path;
protected routePricing = publicRoutes.pricing.path; protected readonly routePricing = publicRoutes.pricing.path;
protected routeResources = publicRoutes.resources.path; protected readonly routeResources = publicRoutes.resources.path;
protected routerLinkAbout = publicRoutes.about.routerLink; protected readonly routerLinkAbout = publicRoutes.about.routerLink;
protected routerLinkAccount = internalRoutes.account.routerLink; protected readonly routerLinkAccount = internalRoutes.account.routerLink;
protected routerLinkAccounts = internalRoutes.accounts.routerLink; protected readonly routerLinkAccounts = internalRoutes.accounts.routerLink;
protected routerLinkAdminControl = internalRoutes.adminControl.routerLink; protected readonly routerLinkAdminControl =
protected routerLinkFeatures = publicRoutes.features.routerLink; internalRoutes.adminControl.routerLink;
protected routerLinkMarkets = publicRoutes.markets.routerLink; protected readonly routerLinkFeatures = publicRoutes.features.routerLink;
protected routerLinkPortfolio = internalRoutes.portfolio.routerLink; protected readonly routerLinkMarkets = publicRoutes.markets.routerLink;
protected routerLinkPricing = publicRoutes.pricing.routerLink; protected readonly routerLinkPortfolio = internalRoutes.portfolio.routerLink;
protected routerLinkRegister = publicRoutes.register.routerLink; protected readonly routerLinkPricing = publicRoutes.pricing.routerLink;
protected routerLinkResources = publicRoutes.resources.routerLink; protected readonly routerLinkRegister = publicRoutes.register.routerLink;
protected readonly routerLinkResources = publicRoutes.resources.routerLink;
public constructor( public constructor(
private dataService: DataService, private readonly dataService: DataService,
private destroyRef: DestroyRef, private readonly destroyRef: DestroyRef,
private dialog: MatDialog, private readonly dialog: MatDialog,
private impersonationStorageService: ImpersonationStorageService, private readonly impersonationStorageService: ImpersonationStorageService,
private layoutService: LayoutService, private readonly layoutService: LayoutService,
private notificationService: NotificationService, private readonly notificationService: NotificationService,
private router: Router, private readonly router: Router,
private settingsStorageService: SettingsStorageService, private readonly settingsStorageService: SettingsStorageService,
private tokenStorageService: TokenStorageService, private readonly tokenStorageService: TokenStorageService,
private userService: UserService private readonly userService: UserService
) { ) {
this.impersonationStorageService this.impersonationStorageService
.onChangeHasImpersonation() .onChangeHasImpersonation()

Loading…
Cancel
Save