diff --git a/src/app/pages/accounts/create-account/create-account.component.ts b/src/app/pages/accounts/create-account/create-account.component.ts index c29d714..bbdec1c 100644 --- a/src/app/pages/accounts/create-account/create-account.component.ts +++ b/src/app/pages/accounts/create-account/create-account.component.ts @@ -38,6 +38,22 @@ export class CreateAccountComponent implements OnInit { referrer: ['', Validators.required], businessCategory: ['', Validators.required], }); + this.loadSearchData(); + } + + get createFormStub(): any { + return this.createForm.controls; + } + + onSubmit(): void { + this.submitted = true; + if (this.createForm.invalid || !confirm('Create account?')) { + return; + } + this.submitted = false; + } + + loadSearchData(): void { this.userService.getCategories(); this.userService.categoriesSubject.subscribe((res) => { this.categories = Object.keys(res); @@ -55,16 +71,4 @@ export class CreateAccountComponent implements OnInit { .pipe(first()) .subscribe((res) => (this.genders = res)); } - - get createFormStub(): any { - return this.createForm.controls; - } - - onSubmit(): void { - this.submitted = true; - if (this.createForm.invalid || !confirm('Create account?')) { - return; - } - this.submitted = false; - } }