This commit is contained in:
@@ -281,14 +281,12 @@ namespace AyaNova.Biz
|
||||
|
||||
//Accept a json template
|
||||
//return a column list suitable for api list return
|
||||
public static string GenerateListColumnsJSONFromTemplate(AyaType defaultLinkType, string ObjectKey, string template)
|
||||
public static string GenerateListColumnsJSONFromTemplate(AyaType defaultLinkType, List<AyaObjectFieldDefinition> objectFields, string template)
|
||||
{
|
||||
//parse the template
|
||||
var jtemplate = JObject.Parse(template);
|
||||
|
||||
//get the fields list
|
||||
var fields = AyaObjectFields(ObjectKey);
|
||||
|
||||
|
||||
//convert to strings (https://stackoverflow.com/a/33836599/8939)
|
||||
var fullFields = ((JArray)jtemplate["full"]).ToObject<string[]>();
|
||||
|
||||
@@ -301,7 +299,7 @@ namespace AyaNova.Biz
|
||||
|
||||
foreach (string s in fullFields)
|
||||
{
|
||||
AyaObjectFieldDefinition o = fields.FirstOrDefault(x => x.FieldKey == s);
|
||||
AyaObjectFieldDefinition o = objectFields.FirstOrDefault(x => x.FieldKey == s);
|
||||
#if (DEBUG)
|
||||
//Developers little helper
|
||||
if (o == null)
|
||||
|
||||
Reference in New Issue
Block a user