fix: Change password dialog password validation issue

This commit is contained in:
Jose Alberto Hernandez
2025-03-25 16:00:12 -05:00
parent 7e881a9afb
commit f708f962b0
2 changed files with 38 additions and 2 deletions
@@ -16,6 +16,11 @@ import { PasswordsUtility } from 'app/core/utils/passwords-utility';
export class ChangePasswordDialogComponent implements OnInit {
/** Change Password Form */
changePasswordForm: any;
/** Password input field type. */
passwordInputType: string[] = [
'password',
'password'
];
/**
* @param {MatDialogRef} dialogRef Component reference to dialog.
@@ -32,6 +37,15 @@ export class ChangePasswordDialogComponent implements OnInit {
this.createChangePasswordForm();
}
/**
* Toggles the visibility of the password input field.
*
* Changes the input type between 'password' and 'text'.
*/
togglePasswordVisibility(index: number) {
this.passwordInputType[index] = this.passwordInputType[index] === 'password' ? 'text' : 'password';
}
/** Change Password form */
createChangePasswordForm() {
this.changePasswordForm = this.formBuilder.group({