Account view components made extensible

pull/10384/head
iyilm4z 4 years ago
parent 7cc616a097
commit 70e672928c

@ -11,17 +11,17 @@ namespace Volo.Abp.Account.Web.Pages.Account.Components.ProfileManagementGroup.P
{
public class AccountProfilePasswordManagementGroupViewComponent : AbpViewComponent
{
private readonly IProfileAppService _profileAppService;
protected IProfileAppService ProfileAppService { get; }
public AccountProfilePasswordManagementGroupViewComponent(
IProfileAppService profileAppService)
{
_profileAppService = profileAppService;
ProfileAppService = profileAppService;
}
public async Task<IViewComponentResult> InvokeAsync()
public virtual async Task<IViewComponentResult> InvokeAsync()
{
var user = await _profileAppService.GetAsync();
var user = await ProfileAppService.GetAsync();
var model = new ChangePasswordInfoModel
{

@ -11,19 +11,19 @@ namespace Volo.Abp.Account.Web.Pages.Account.Components.ProfileManagementGroup.P
{
public class AccountProfilePersonalInfoManagementGroupViewComponent : AbpViewComponent
{
private readonly IProfileAppService _profileAppService;
protected IProfileAppService ProfileAppService { get; }
public AccountProfilePersonalInfoManagementGroupViewComponent(
IProfileAppService profileAppService)
{
_profileAppService = profileAppService;
ProfileAppService = profileAppService;
ObjectMapperContext = typeof(AbpAccountWebModule);
}
public async Task<IViewComponentResult> InvokeAsync()
public virtual async Task<IViewComponentResult> InvokeAsync()
{
var user = await _profileAppService.GetAsync();
var user = await ProfileAppService.GetAsync();
var model = ObjectMapper.Map<ProfileDto, PersonalInfoModel>(user);

Loading…
Cancel
Save