Open Closed

Labels missing for extended properties of Module entities #7698


User avatar
0
scott7106 created
  • ABP Framework version: v8.2.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Missing Labels

We have extended the SaasTenants object. After upgrading to 8.1.4, we noticed that the create/edit screen for tenants does not show the labels. The Index page correctly shows the headers for the additional columns so the localized string is working there. This appears to be a UI bug or something we need to add which wasn't required in earlier versions. We noticed this with 8.1.4, but cannot confirm whether that is where it was introduced.

ObjectExtensionManager.Instance.Modules()
                .ConfigureSaas(saas =>
                {
                    saas.ConfigureTenant(tenant =>
                    {
                        tenant.AddOrUpdateProperty<string>(
                            "ClientCode",
                            property =>
                            {
                                property.Attributes.Add(new RequiredAttribute());
                                property.Attributes.Add(new StringLengthAttribute(MultiTenancyConsts.ClientCodeMaxLength));
                                property.DisplayName = LocalizableString.Create<ZiplineResource>("::ClientCode");
                                property.UI.OnTable.IsVisible = false;
                            });

                        tenant.AddOrUpdateProperty<string>(
                            "EnvironmentCode",
                            property =>
                            {
                                property.Attributes.Add(new RequiredAttribute());
                                property.Attributes.Add(new StringLengthAttribute(MultiTenancyConsts.EnvironmentCodeMaxLength));
                                property.DisplayName = LocalizableString.Create<ZiplineResource>("::EnvironmentCode");
                                property.UI.OnTable.IsVisible = false;
                            });

                        tenant.AddOrUpdateProperty<string>(
                            "TenantCode",
                            property =>
                            {
                                property.Attributes.Add(new StringLengthAttribute(MultiTenancyConsts.TenantCodeMaxLength));
                                property.DisplayName = LocalizableString.Create<ZiplineResource>("::TenantCode");
                                property.UI.OnCreateForm.IsVisible = false;
                                property.UI.OnEditForm.IsVisible = false;
                            });

                        tenant.AddOrUpdateProperty<EnvironmentType>(
                            "EnvironmentType",
                            property =>
                            {
                                property.DefaultValue = EnvironmentType.Development;
                                property.Attributes.Add(new RequiredAttribute());
                                property.DisplayName = LocalizableString.Create<ZiplineResource>("::EnvironmentType");
                            });

                        tenant.AddOrUpdateProperty<StructureType>(
                            "StructureType",
                            property =>
                            {
                                property.DefaultValue = StructureType.Warehouse;
                                property.Attributes.Add(new RequiredAttribute());
                                property.DisplayName = LocalizableString.Create<ZiplineResource>("::StructureType");
                            });

                        tenant.AddOrUpdateProperty<string>(
                            "Description",
                            property =>
                            {
                                property.Attributes.Add(new StringLengthAttribute(MultiTenancyConsts.DescriptionMaxLength));
                                property.UI.OnTable.IsVisible = false;
                                property.DisplayName = LocalizableString.Create<ZiplineResource>("::Description");
                            });
                    });
                });

5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    we noticed that the create/edit screen for tenants does not show the labels.

    What is the UI of the create/edit page? angular or mvc?

    Can you share a demo template project to reproduce this?

    liming.ma@volosoft.com

    Thanks.

  • User Avatar
    0
    scott7106 created

    We are using Angular and have not edited the UI. I sent you an invite to the GitHub repo.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will forward this to our angular team.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello, I have carefully investigated your case and realized that this issue was addressed before. If you just remove the :: separation, the problem should be solved. Here is the related issue and documentation references.

    Thank you for your cooperation.

  • User Avatar
    0
    scott7106 created

    Thank you!

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09