fix: NCWF-2 bugs and desing fixes (#7)
Co-authored-by: Lala, Shahd <Shahd.Lala@sybit.de> Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
@@ -46,15 +46,18 @@ export class RegisterDialogComponent {
|
||||
|
||||
this.isLoading = true;
|
||||
this.errorMessage = null;
|
||||
this.registerForm.disable();
|
||||
|
||||
const { username, email, password: pwd } = this.registerForm.value;
|
||||
const { username, email, password: pwd } = this.registerForm.getRawValue();
|
||||
this.authService.register(username, pwd, email).subscribe({
|
||||
next: () => {
|
||||
this.isLoading = false;
|
||||
this.registerForm.enable();
|
||||
this.onSuccess.emit();
|
||||
},
|
||||
error: (err) => {
|
||||
this.isLoading = false;
|
||||
this.registerForm.enable();
|
||||
this.errorMessage =
|
||||
err.error?.message || 'Registration failed. Please try again.';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user