Ends in:
2 DAYS
14 HRS
53 MIN
52 SEC
Ends in:
2 D
14 H
53 M
52 S
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 v9.1.0-preview. Updated on December 02, 2024, 12:35