From 6a59fa588f3cd9f9c232f0afc6676d8301a7b24f Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Thu, 9 Jul 2026 23:39:23 +0700 Subject: [PATCH] feat(client): replace constructor based DI with inject functions --- .../portfolio-summary/portfolio-summary.component.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts b/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts index abf2f8563..7fdcd112b 100644 --- a/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts +++ b/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts @@ -9,6 +9,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, + inject, Input, OnChanges, Output @@ -49,6 +50,12 @@ export class GfPortfolioSummaryComponent implements OnChanges { protected precision = 2; protected timeInMarket: string | undefined; + private readonly notificationService = inject(NotificationService); + + public constructor() { + addIcons({ ellipsisHorizontalCircleOutline, informationCircleOutline }); + } + protected get buyingPowerPercentage() { return this.summary?.totalValueInBaseCurrency ? this.summary.cash / this.summary.totalValueInBaseCurrency @@ -69,10 +76,6 @@ export class GfPortfolioSummaryComponent implements OnChanges { : 0; } - public constructor(private notificationService: NotificationService) { - addIcons({ ellipsisHorizontalCircleOutline, informationCircleOutline }); - } - public ngOnChanges() { if (this.summary) { if (