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 :
image.png

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 :
image.png

Here is the view :
image.png

and the code behind :
image.png

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

    Screen Shot 2022-09-28 at 10.16.33.png

  • User Avatar
    0
    dlapointe created

    Perfect!

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

    Thanks

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on May 15, 2025, 10:28