Open Closed

Customize personal info page #5838


User avatar
0
manuel42 created
  • ABP Framework version: v.7.0.3
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

Hello,

I want to extend the personal info UI page with a checkbox. Is it possible to extend the personal info UI with the module entity extension or need I to replace the the whole profile management tab under **Pages/Account/Components/ProfileManagementGroup/PersonalInfo/Default.cshtml ** or is there a faster way to extend the personal info UI ?

Thank you in advanced


7 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello manuel42 Can you please refer this link https://support.abp.io/QA/Questions/2989/Overriding-PersonalInfo-for-extra-properties https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project

  • User Avatar
    0
    manuel42 created

    Thank you for the guide. I have followed them but the extra property is not rendered to UI. I have added a custom Default.cshtml for the PersonalInfo tab.

    The red highlighted part is always empty.

    I have added a CustomPersonalInfoModel, I have added the DtoExtensions to ProfileDTo and UpdateProfileDto, I have added the custom converter(But in this case I think this is not relevant)

    I have also tried to add a custom check box but if I change they value the ExtraProperties value are not changed in the update method of the ProfileAppService.cs

    What I need to do to render and use the custom checkBox ?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello manuel42,

    I am trying to reproduce the issue at my end. Could you please share the UI changes you have done in Default.cshtml so that we can assist you in better way

    Regards,

  • User Avatar
    0
    manuel42 created

    Hello Anjali_Musmade,

    this is only change I did in the Default.cshtml

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello manuel42,

    I have tried at my end like this please check it

    1.Default.cshtml

    1. ProfileDto

    1. UpdateProfileDto

    1. ProfileAppService

    If we check the checkbox value comes true

    If we don't check the checkbox value comes false

    please do let me know if found helpful

    Thank you, Anjali

  • User Avatar
    0
    manuel42 created

    I want to use the UI extension system. In the foreach loop on the Default.cshtml you can see that this feature is already implemented (render all extraProperties of the PersonalInfoModel).

    In the xxx.Application.Contracts project I have extended the DTOs with the ObjectExtensionsManager

    In Meantime I have played around with it and I was able to use it when I replace CustomPersonalInfoModel with the ProfileDto. Either the usage of the PersonalInfoModel in the foreach loop is a issue or there is another way to extend the PersonalInfoPage with UI extension system? Could you please check it ?

    I want to avoid custom replacements because they need more more afford in the future to update them in a new ABP version.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello manuel42,

    could you please try to set property of Extraproperty in UpdateAsync

    by adding this code

    user.SetProperty("AllowUsePersonalData", input.AllowUsePersonalData);
    

    Please do let me know if this helps you

    Thank you, Anjali

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35