Open Closed

Tenant Edit/Create Modal - how to override? #3762


User avatar
0
dlapointe created
  • ABP Framework version: 6.0.0-rc.4
  • UI type: MVC
  • DB provider: EF Core with MySql
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hi all, I need to override the EditModal and CreateModal of the tenant page in order to customize a few fields added on the Tenant entity. So far i managed to get them added 'generically' by using the the ObjectExtensionManager as such :

This allows me to have the new fields in both popup but i need to customize the input for OpenAt and CloseAt to be a time picker and not a text input. (as you can see we use TimeOnly) I followed the documentation on how to override pages (both cshtml and .cs) but as i dont have access to this module code (SAAS) i dont know how to build the page.

At the moment, i did override based on the 'framework' tenant management module (https://github.com/abpframework/abp/tree/dev/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants)

I did change the path to Saas/Host/Tenant but obviously it throws an error :

Here is the view :

and the code behind :

How can we override the Tenant edit/create popup without having access to the code (as a premium module) which is not available on Teams license?

Thank you


2 Answer(s)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    It is normal that you cannot use TimeOnly because MyProjectName.DomainShared targets netstandard2.0. But you can do a similar thing by adding an attribute like the code below:

       user.AddOrUpdateProperty<DateTime>(
           "OpenAt",
           options =>
           {
              options.Attributes.Add(new DataTypeAttribute(DataType.Time));
           }
       );
    

    Result

  • User Avatar
    0
    dlapointe created

    Perfect!

    As for the .netstandard, we moved the whole solution to .net6.

    Thanks

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19