Started working on admin page modal

This commit is contained in:
2024-10-08 21:34:00 +02:00
parent bc0651cb75
commit d2729870e3
7 changed files with 180 additions and 29 deletions

View File

@@ -13,8 +13,23 @@ public sealed class AdminPageProperty {
public bool Editable { get; set; } = true;
public bool EditDisplayValue { get; set; } = true;
public bool Generated { get; set; }
public bool Bold { get; set; } = false;
public bool Bold { get; set; }
public bool Required { get; set; }
public bool Ignore { get; set; }
[JsonIgnore]
public Type Type { get; set; }
public Func<object, bool> Validator { get; set; }
public object GetValue(object entry) {
return entry.GetType().GetProperty(Name)?.GetValue(entry);
}
public T GetValue<T>(object entry) {
return (T)entry.GetType().GetProperty(Name)?.GetValue(entry);
}
public void SetValue(object entry, object value) {
entry.GetType().GetProperty(Name)?.SetValue(entry, value);
}
}