|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import { ProfileDto, ProfileService } from '@abp/ng.account.core/proxy'; |
|
|
|
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared'; |
|
|
|
import { Component, Inject, Injector, OnInit } from '@angular/core'; |
|
|
|
import { Component, inject, Injector, OnInit } from '@angular/core'; |
|
|
|
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; |
|
|
|
import { finalize, filter } from 'rxjs/operators'; |
|
|
|
import { Account } from '../../models/account'; |
|
|
|
@ -31,25 +31,24 @@ export class PersonalSettingsComponent |
|
|
|
Account.PersonalSettingsComponentInputs, |
|
|
|
Account.PersonalSettingsComponentOutputs |
|
|
|
{ |
|
|
|
private readonly fb = inject(UntypedFormBuilder); |
|
|
|
protected readonly toasterService = inject(ToasterService); |
|
|
|
protected readonly profileService = inject(ProfileService); |
|
|
|
protected readonly manageProfileState = inject(ManageProfileStateService); |
|
|
|
protected readonly authService = inject(AuthService); |
|
|
|
protected readonly confirmationService = inject(ConfirmationService); |
|
|
|
protected readonly configState = inject(ConfigStateService); |
|
|
|
protected readonly isPersonalSettingsChangedConfirmationActive = inject( |
|
|
|
RE_LOGIN_CONFIRMATION_TOKEN, |
|
|
|
); |
|
|
|
private readonly injector = inject(Injector); |
|
|
|
|
|
|
|
selected?: ProfileDto; |
|
|
|
|
|
|
|
form!: UntypedFormGroup; |
|
|
|
|
|
|
|
inProgress?: boolean; |
|
|
|
|
|
|
|
constructor( |
|
|
|
private fb: UntypedFormBuilder, |
|
|
|
private toasterService: ToasterService, |
|
|
|
private profileService: ProfileService, |
|
|
|
private manageProfileState: ManageProfileStateService, |
|
|
|
private readonly authService: AuthService, |
|
|
|
private confirmationService: ConfirmationService, |
|
|
|
private configState: ConfigStateService, |
|
|
|
@Inject(RE_LOGIN_CONFIRMATION_TOKEN) |
|
|
|
private isPersonalSettingsChangedConfirmationActive: boolean, |
|
|
|
protected injector: Injector, |
|
|
|
) {} |
|
|
|
|
|
|
|
buildForm() { |
|
|
|
this.selected = this.manageProfileState.getProfile(); |
|
|
|
if (!this.selected) { |
|
|
|
|