Open Closed

Identity Module Extension DateTime input is not visible #2601


User avatar
0
can.ercan created
  • ABP Framework version: v4.4.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hello,

I am trying to add extra fields to IdentityUser with ModuleExtensionConfiguration. I succesfully added a Guid,string and an Enum Type. But the DateTime field I added does not appear on the add user modal. The label of the field is visible but input is not.

        ObjectExtensionManager.Instance.Modules()
             .ConfigureIdentity(identity =>
             {
                 identity.ConfigureUser(user =>
                 {
                     user.AddOrUpdateProperty<Guid>( //property type: string
                         "CompanyId", //property name
                         property =>
                         {
                             //validation rules

                             
                             
                             property.UI.Lookup.Url = "/api/app/my-companies";
                             property.UI.Lookup.DisplayPropertyName = "name";
                             property.UI.Lookup.ValuePropertyName = "id";
                             
                             //...other configurations for this property
                         }
                     );

                     user.AddOrUpdateProperty<string>( //property type: string
                       "TcNo", //property name
                       property =>
                       {
                           property.Validators.Add(context =>
                           {
                               var socialSecurityNumber = context.Value as string;

                               if (!socialSecurityNumber.IsNullOrEmpty() && !ValidateTc(socialSecurityNumber))
                               {
                                   context.ValidationErrors.Add(
                                       new ValidationResult(
                                           "Geçersiz Tc Kimlik: " + socialSecurityNumber,
                                           new[] { "SocialSecurityNumber" }
                                       )
                                   );
                               }
                           });
                       }
                     );
                    
                     user.AddOrUpdateProperty<UserType>("UserType");
                     user.AddOrUpdateProperty<DateTime>("BirthDate");

                 });
             });

user.AddOrUpdateProperty<UserType>("UserType"); user.AddOrUpdateProperty<DateTime>("BirthDate");

Thanks, Can Ercan


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

    I did tests for both the 4.4.4 and 5.1.3 versions, apparently, this is a bug.

    So, I am creating an internal issue related to the topic, FYI.

    Thank you for the report.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11