Working on Admin page modal

This commit is contained in:
2024-10-13 17:42:40 +02:00
parent d2729870e3
commit 599ce2bf43
15 changed files with 157 additions and 14 deletions

View File

@@ -113,6 +113,12 @@ internal sealed class AdminPageGenerator<TModel> : IAdminPageGenerator<TModel>,
return generator;
}
public IAdminPageGenerator<TModel> ListingProperty<TProperty>(Expression<Func<TModel, TProperty>> propertyExpression) {
var property = GetPropertyInfo(propertyExpression);
Page.ListingProperty = property.Name;
return this;
}
public AdminPage<TModel> Compile() {
var properties = new List<AdminPageProperty>();

View File

@@ -70,6 +70,11 @@ internal sealed class AdminPropertyGenerator(string name, Type type) : IAdminPro
return this;
}
public IAdminPropertyGenerator IsSelector<TSelector>() {
_property.SelectorType = typeof(TSelector);
return this;
}
public AdminPageProperty Compile() {
_property.DisplayName ??= _property.Name;
return _property;