Browse Source

feat(client): change public fields and methods to protected

pull/6683/head
KenTandrian 2 months ago
parent
commit
8974d568b9
  1. 16
      apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts

16
apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts

@ -51,10 +51,10 @@ import { CreateOrUpdateAccountDialogParams } from './interfaces/interfaces';
templateUrl: 'create-or-update-account-dialog.html' templateUrl: 'create-or-update-account-dialog.html'
}) })
export class GfCreateOrUpdateAccountDialogComponent { export class GfCreateOrUpdateAccountDialogComponent {
public accountForm: FormGroup; protected accountForm: FormGroup;
public currencies: string[] = []; protected currencies: string[] = [];
public filteredPlatforms: Observable<Platform[]> | undefined; protected filteredPlatforms: Observable<Platform[]> | undefined;
public platforms: Platform[] = []; protected platforms: Platform[] = [];
protected readonly data = protected readonly data =
inject<CreateOrUpdateAccountDialogParams>(MAT_DIALOG_DATA); inject<CreateOrUpdateAccountDialogParams>(MAT_DIALOG_DATA);
@ -103,7 +103,7 @@ export class GfCreateOrUpdateAccountDialogComponent {
}); });
} }
public autoCompleteCheck() { protected autoCompleteCheck() {
const inputValue = this.accountForm.get('platformId')?.value; const inputValue = this.accountForm.get('platformId')?.value;
if (typeof inputValue === 'string') { if (typeof inputValue === 'string') {
@ -117,15 +117,15 @@ export class GfCreateOrUpdateAccountDialogComponent {
} }
} }
public displayFn(platform: Platform) { protected displayFn(platform: Platform) {
return platform?.name ?? ''; return platform?.name ?? '';
} }
public onCancel() { protected onCancel() {
this.dialogRef.close(); this.dialogRef.close();
} }
public async onSubmit() { protected async onSubmit() {
const account: CreateAccountDto | UpdateAccountDto = { const account: CreateAccountDto | UpdateAccountDto = {
balance: this.accountForm.get('balance')?.value, balance: this.accountForm.get('balance')?.value,
comment: this.accountForm.get('comment')?.value || null, comment: this.accountForm.get('comment')?.value || null,

Loading…
Cancel
Save