This commit is contained in:
@@ -73,7 +73,7 @@ namespace AyaNova.DataList
|
||||
|
||||
//Has a Enumtype?
|
||||
if (!string.IsNullOrEmpty(o.EnumType))
|
||||
sb.Append($",\"et\":\"{TrimTypeName(o.EnumType)}\"");
|
||||
sb.Append($",\"et\":\"{AyaNova.Util.StringUtil.TrimTypeName(o.EnumType)}\"");
|
||||
|
||||
sb.Append("}");
|
||||
|
||||
@@ -85,16 +85,6 @@ namespace AyaNova.DataList
|
||||
}
|
||||
|
||||
|
||||
//used to trim an enum type down to only it's most relevant (rightmost) portion
|
||||
private string TrimTypeName(string str)
|
||||
{
|
||||
if (str.Contains('.'))
|
||||
{
|
||||
return str.Substring(str.LastIndexOf('.') + 1);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
//make sure the template parses and all the fields specified are really existant
|
||||
//this is more for dev errors or api users becuase the client shouldn't generate bad templates
|
||||
public bool ValidateTemplate(string template)
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace AyaNova.DataList
|
||||
LtKey = "WidgetUserType",
|
||||
FieldKey = "widgetusertype",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = typeof(AuthorizationRoles).ToString(),
|
||||
EnumType = typeof(UserType).ToString(),
|
||||
SqlValueColumnName = "awidget.usertype"
|
||||
});
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
|
||||
Reference in New Issue
Block a user