mirror of https://github.com/abpframework/abp.git
committed by
GitHub
8 changed files with 70 additions and 56 deletions
@ -1,17 +1,42 @@ |
|||
import { fadeIn } from '@abp/ng.theme.shared'; |
|||
import { transition, trigger, useAnimation } from '@angular/animations'; |
|||
import { Component } from '@angular/core'; |
|||
import { Component, OnInit } from '@angular/core'; |
|||
import { eAccountComponents } from '../../enums/components'; |
|||
import { Store } from '@ngxs/store'; |
|||
import { GetProfile, ProfileState } from '@abp/ng.core'; |
|||
|
|||
@Component({ |
|||
selector: 'abp-manage-profile', |
|||
templateUrl: './manage-profile.component.html', |
|||
animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])], |
|||
styles: [ |
|||
` |
|||
.min-h-400 { |
|||
min-height: 400px; |
|||
} |
|||
`,
|
|||
], |
|||
}) |
|||
export class ManageProfileComponent { |
|||
export class ManageProfileComponent implements OnInit { |
|||
selectedTab = 0; |
|||
|
|||
changePasswordKey = eAccountComponents.ChangePassword; |
|||
|
|||
personalSettingsKey = eAccountComponents.PersonalSettings; |
|||
|
|||
isProfileLoaded: boolean; |
|||
|
|||
hideChangePasswordTab: boolean; |
|||
|
|||
constructor(private store: Store) {} |
|||
|
|||
ngOnInit() { |
|||
this.store.dispatch(new GetProfile()).subscribe(() => { |
|||
this.isProfileLoaded = true; |
|||
if (this.store.selectSnapshot(ProfileState.getProfile).isExternal) { |
|||
this.hideChangePasswordTab = true; |
|||
this.selectedTab = 1; |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue