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:
@@ -38,15 +38,18 @@ export class LoginDialogComponent {
|
||||
|
||||
this.isLoading = true;
|
||||
this.errorMessage = null;
|
||||
this.loginForm.disable();
|
||||
|
||||
const { username, password } = this.loginForm.value;
|
||||
const { username, password } = this.loginForm.getRawValue();
|
||||
this.authService.login(username, password).subscribe({
|
||||
next: () => {
|
||||
this.isLoading = false;
|
||||
this.loginForm.enable();
|
||||
this.onSuccess.emit();
|
||||
},
|
||||
error: (err) => {
|
||||
this.isLoading = false;
|
||||
this.loginForm.enable();
|
||||
this.errorMessage = err.error?.message || 'Login failed. Please try again.';
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user