Browse Source

feat(client): enforce encapsulation

pull/7301/head
KenTandrian 4 days ago
parent
commit
df7a77b696
  1. 22
      apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts

22
apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts

@ -53,26 +53,26 @@ import { UserAccountRegistrationDialogParams } from './interfaces/interfaces';
templateUrl: 'user-account-registration-dialog.html' templateUrl: 'user-account-registration-dialog.html'
}) })
export class GfUserAccountRegistrationDialogComponent { export class GfUserAccountRegistrationDialogComponent {
@ViewChild(MatStepper) stepper!: MatStepper; @ViewChild(MatStepper) protected stepper!: MatStepper;
public accessToken: string | undefined; protected accessToken: string | undefined;
public authToken: string; protected authToken: string;
public isCreateAccountButtonDisabled = true; protected isCreateAccountButtonDisabled = true;
public isDisclaimerChecked = false; protected isDisclaimerChecked = false;
public role: string; protected role: string;
public routerLinkAboutTermsOfService = protected readonly routerLinkAboutTermsOfService =
publicRoutes.about.subRoutes.termsOfService.routerLink; publicRoutes.about.subRoutes.termsOfService.routerLink;
public constructor( public constructor(
private changeDetectorRef: ChangeDetectorRef, private changeDetectorRef: ChangeDetectorRef,
@Inject(MAT_DIALOG_DATA) public data: UserAccountRegistrationDialogParams, @Inject(MAT_DIALOG_DATA) protected data: UserAccountRegistrationDialogParams,
private dataService: DataService, private dataService: DataService,
private destroyRef: DestroyRef private destroyRef: DestroyRef
) { ) {
addIcons({ arrowForwardOutline, checkmarkOutline, copyOutline }); addIcons({ arrowForwardOutline, checkmarkOutline, copyOutline });
} }
public createAccount() { protected createAccount() {
this.dataService this.dataService
.postUser() .postUser()
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
@ -87,11 +87,11 @@ export class GfUserAccountRegistrationDialogComponent {
}); });
} }
public enableCreateAccountButton() { protected enableCreateAccountButton() {
this.isCreateAccountButtonDisabled = false; this.isCreateAccountButtonDisabled = false;
} }
public onChangeDislaimerChecked() { protected onChangeDislaimerChecked() {
this.isDisclaimerChecked = !this.isDisclaimerChecked; this.isDisclaimerChecked = !this.isDisclaimerChecked;
} }
} }

Loading…
Cancel
Save