Browse Source

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

pull/7293/head
KenTandrian 5 days ago
parent
commit
6a59fa588f
  1. 11
      apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts

11
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts

@ -9,6 +9,7 @@ import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
Component, Component,
EventEmitter, EventEmitter,
inject,
Input, Input,
OnChanges, OnChanges,
Output Output
@ -49,6 +50,12 @@ export class GfPortfolioSummaryComponent implements OnChanges {
protected precision = 2; protected precision = 2;
protected timeInMarket: string | undefined; protected timeInMarket: string | undefined;
private readonly notificationService = inject(NotificationService);
public constructor() {
addIcons({ ellipsisHorizontalCircleOutline, informationCircleOutline });
}
protected get buyingPowerPercentage() { protected get buyingPowerPercentage() {
return this.summary?.totalValueInBaseCurrency return this.summary?.totalValueInBaseCurrency
? this.summary.cash / this.summary.totalValueInBaseCurrency ? this.summary.cash / this.summary.totalValueInBaseCurrency
@ -69,10 +76,6 @@ export class GfPortfolioSummaryComponent implements OnChanges {
: 0; : 0;
} }
public constructor(private notificationService: NotificationService) {
addIcons({ ellipsisHorizontalCircleOutline, informationCircleOutline });
}
public ngOnChanges() { public ngOnChanges() {
if (this.summary) { if (this.summary) {
if ( if (

Loading…
Cancel
Save