From 1b4167816cf319abf4560d9dee631a3050d20a9c Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sat, 23 May 2026 12:24:16 +0700 Subject: [PATCH] feat(client): enforce encapsulation --- .../home-summary/home-summary.component.ts | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/client/src/app/components/home-summary/home-summary.component.ts b/apps/client/src/app/components/home-summary/home-summary.component.ts index f6c43762c..5769506b7 100644 --- a/apps/client/src/app/components/home-summary/home-summary.component.ts +++ b/apps/client/src/app/components/home-summary/home-summary.component.ts @@ -30,15 +30,16 @@ import { DeviceDetectorService } from 'ngx-device-detector'; templateUrl: './home-summary.html' }) export class GfHomeSummaryComponent implements OnInit { - public deviceType: string; - public hasImpersonationId: boolean; - public hasPermissionForSubscription: boolean; - public hasPermissionToUpdateUserSettings: boolean; - public info: InfoItem; - public isLoading = true; - public snackBarRef: MatSnackBarRef; - public summary: PortfolioSummary; - public user: User; + protected deviceType: string; + protected hasImpersonationId: boolean; + protected hasPermissionToUpdateUserSettings: boolean; + protected isLoading = true; + protected summary: PortfolioSummary; + protected user: User; + + private hasPermissionForSubscription: boolean; + private info: InfoItem; + private snackBarRef: MatSnackBarRef; private readonly changeDetectorRef = inject(ChangeDetectorRef); private readonly dataService = inject(DataService); @@ -84,7 +85,7 @@ export class GfHomeSummaryComponent implements OnInit { }); } - public onChangeEmergencyFund(emergencyFund: number) { + protected onChangeEmergencyFund(emergencyFund: number) { this.dataService .putUserSetting({ emergencyFund }) .pipe(takeUntilDestroyed(this.destroyRef))