|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import { ProfileService } from '@abp/ng.account.core/proxy'; |
|
|
|
import { ButtonComponent, getPasswordValidators, ToasterService } from '@abp/ng.theme.shared'; |
|
|
|
import { Component, Injector, OnInit } from '@angular/core'; |
|
|
|
import { Component, Injector, OnInit, inject } from '@angular/core'; |
|
|
|
import { |
|
|
|
ReactiveFormsModule, |
|
|
|
UntypedFormBuilder, |
|
|
|
@ -32,6 +32,12 @@ const PASSWORD_FIELDS = ['newPassword', 'repeatNewPassword']; |
|
|
|
export class ChangePasswordComponent |
|
|
|
implements OnInit, Account.ChangePasswordComponentInputs, Account.ChangePasswordComponentOutputs |
|
|
|
{ |
|
|
|
private fb = inject(UntypedFormBuilder); |
|
|
|
private injector = inject(Injector); |
|
|
|
private toasterService = inject(ToasterService); |
|
|
|
private profileService = inject(ProfileService); |
|
|
|
private manageProfileState = inject(ManageProfileStateService); |
|
|
|
|
|
|
|
form!: UntypedFormGroup; |
|
|
|
|
|
|
|
inProgress?: boolean; |
|
|
|
@ -44,14 +50,6 @@ export class ChangePasswordComponent |
|
|
|
return errors.concat(groupErrors.filter(({ key }) => key === 'passwordMismatch')); |
|
|
|
}; |
|
|
|
|
|
|
|
constructor( |
|
|
|
private fb: UntypedFormBuilder, |
|
|
|
private injector: Injector, |
|
|
|
private toasterService: ToasterService, |
|
|
|
private profileService: ProfileService, |
|
|
|
private manageProfileState: ManageProfileStateService, |
|
|
|
) {} |
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
this.hideCurrentPassword = !this.manageProfileState.getProfile()?.hasPassword; |
|
|
|
|
|
|
|
|