hide lookup property from Getoperation and refactoring.

pull/6219/head
Ilkay Ilknur 5 years ago
parent 8ac5e85549
commit 700f9884e6

@ -52,23 +52,23 @@ namespace Volo.Abp.ObjectExtending.Modularity
NormalizeProperty(propertyInfo);
AddLookupProperty(propertyInfo);
return this;
}
private void AddLookupProperty(ExtensionPropertyConfiguration propertyInfo)
{
if (!propertyInfo.UI.Lookup.Url.IsNullOrEmpty())
{
var lookupPropertyName = $"{propertyInfo.Name}_Text";
var lookupPropertyInfo = Properties.GetOrAdd(
lookupPropertyName,
() => new ExtensionPropertyConfiguration(this, typeof(string), lookupPropertyName)
);
lookupPropertyInfo.DisplayName = propertyInfo.DisplayName ?? new FixedLocalizableString(propertyInfo.Name);
AddLookupTextProperty(propertyInfo);
propertyInfo.UI.OnTable.IsVisible = false;
propertyInfo.Api.OnGet.IsAvailable = false;
}
return this;
}
private void AddLookupTextProperty(ExtensionPropertyConfiguration propertyInfo)
{
var lookupTextPropertyName = $"{propertyInfo.Name}_Text";
var lookupTextPropertyInfo = Properties.GetOrAdd(
lookupTextPropertyName,
() => new ExtensionPropertyConfiguration(this, typeof(string), lookupTextPropertyName)
);
lookupTextPropertyInfo.DisplayName = propertyInfo.DisplayName ?? new FixedLocalizableString(propertyInfo.Name);
}
[NotNull]

Loading…
Cancel
Save