From 166837085d7f5fc5421264f4d55faf5ab62d2de5 Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sat, 11 Jul 2026 10:27:26 +0700 Subject: [PATCH] feat(client): enforce immutability --- .../user-account-settings.component.ts | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts b/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts index da71c101e..cacd17287 100644 --- a/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts +++ b/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts @@ -71,19 +71,19 @@ import { catchError } from 'rxjs/operators'; templateUrl: './user-account-settings.html' }) export class GfUserAccountSettingsComponent implements OnInit { - protected appearancePlaceholder = $localize`Auto`; - protected baseCurrency: string; + protected readonly appearancePlaceholder = $localize`Auto`; + protected readonly baseCurrency: string; protected closeUserAccountMail: string; - protected currencies: string[] = []; - protected deleteOwnUserForm: FormGroup; + protected readonly currencies: string[] = []; + protected readonly deleteOwnUserForm: FormGroup; protected hasPermissionToDeleteOwnUser: boolean; protected hasPermissionToRequestOwnUserDeletion: boolean; protected hasPermissionToUpdateViewMode: boolean; protected hasPermissionToUpdateUserSettings: boolean; protected isAccessTokenHidden = true; - protected isFingerprintSupported = this.doesBrowserSupportAuthn(); + protected readonly isFingerprintSupported = this.doesBrowserSupportAuthn(); protected isWebAuthnEnabled: boolean; - protected language = document.documentElement.lang; + protected readonly language = document.documentElement.lang; protected locales = [ 'ca', 'de', @@ -104,15 +104,15 @@ export class GfUserAccountSettingsComponent implements OnInit { ]; protected user: User; - private changeDetectorRef = inject(ChangeDetectorRef); - private dataService = inject(DataService); - private destroyRef = inject(DestroyRef); - private formBuilder = inject(FormBuilder); - private notificationService = inject(NotificationService); - private settingsStorageService = inject(SettingsStorageService); - private snackBar = inject(MatSnackBar); - private userService = inject(UserService); - private webAuthnService = inject(WebAuthnService); + private readonly changeDetectorRef = inject(ChangeDetectorRef); + private readonly dataService = inject(DataService); + private readonly destroyRef = inject(DestroyRef); + private readonly formBuilder = inject(FormBuilder); + private readonly notificationService = inject(NotificationService); + private readonly settingsStorageService = inject(SettingsStorageService); + private readonly snackBar = inject(MatSnackBar); + private readonly userService = inject(UserService); + private readonly webAuthnService = inject(WebAuthnService); public constructor() { this.deleteOwnUserForm = this.formBuilder.group({