From f00a898085e0206c69dbeb1f795d72b93ddf19ec Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Thu, 9 Jul 2026 23:36:37 +0700 Subject: [PATCH] feat(client): enforce encapsulation --- .../portfolio-summary.component.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 f4ffde9cb..abf2f8563 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 @@ -42,27 +42,27 @@ export class GfPortfolioSummaryComponent implements OnChanges { @Output() emergencyFundChanged = new EventEmitter(); - public buyAndSellActivitiesTooltip = translate( + protected readonly buyAndSellActivitiesTooltip = translate( 'BUY_AND_SELL_ACTIVITIES_TOOLTIP' ); - public precision = 2; - public timeInMarket: string | undefined; + protected precision = 2; + protected timeInMarket: string | undefined; - public get buyingPowerPercentage() { + protected get buyingPowerPercentage() { return this.summary?.totalValueInBaseCurrency ? this.summary.cash / this.summary.totalValueInBaseCurrency : 0; } - public get emergencyFundPercentage() { + protected get emergencyFundPercentage() { return this.summary?.totalValueInBaseCurrency ? (this.summary.emergencyFund?.total || 0) / this.summary.totalValueInBaseCurrency : 0; } - public get excludedFromAnalysisPercentage() { + protected get excludedFromAnalysisPercentage() { return this.summary?.totalValueInBaseCurrency ? this.summary.excludedAccountsAndActivities / this.summary.totalValueInBaseCurrency @@ -98,7 +98,7 @@ export class GfPortfolioSummaryComponent implements OnChanges { } } - public onEditEmergencyFund() { + protected onEditEmergencyFund() { this.notificationService.prompt({ confirmFn: (value) => { const emergencyFund = parseFloat(value.trim()) || 0;