LISTS WORKING cleanup afterwords

This commit is contained in:
2021-02-08 20:10:28 +00:00
parent 4a7f9f06ca
commit 658b345378
48 changed files with 50 additions and 2586 deletions

View File

@@ -19,23 +19,18 @@ namespace AyaNova.DataList
public DataListProcessingBase()
{
/*
NOTE: all sql identifiers need to be explicitly identified as understood by postgres
DefaultColumns = new List<string>() { "XXX", "XXXX", "XXXX", "XXXX", "XXXX", "XXX", "XXXX", "XXXX", "XXXX", "XXXX" };
DefaultSortBy = new Dictionary<string, string>() { { "XXXX", "+" }, { "XXXX", "-" } };
*/
}
public string SQLFrom { get; set; }
public List<DataListFieldDefinition> FieldDefinitions { get; set; }
public AuthorizationRoles AllowedRoles { get; set; }
public AyaType DefaultListObjectType { get; set; }
public long CurrentUserId { get; set; }
public List<string> DefaultColumns { get; set; }
public Dictionary<string, string> DefaultSortBy { get; set; }
@@ -71,22 +66,6 @@ namespace AyaNova.DataList
}
}
// //return array of field keys in list view
// public List<string> GetFieldListFromListView(JArray listViewArray)
// {
// // [{key:"COLUMN UNIQUE KEY ID",sort:"-" or "+",filter:{any:true/false,items:[{FILTER OBJECT SEE BELOW}]} }, {key:"second column unique key"},{...etc...}]
// List<string> ret = new List<string>();
// for (int i = 0; i < listViewArray.Count; i++)
// {
// var cm = listViewArray[i];
// ret.Add(cm["fld"].Value<string>());
// }
// return ret;
// }
public Newtonsoft.Json.Linq.JArray GenerateReturnListColumns(List<string> columns)
{
@@ -197,14 +176,7 @@ namespace AyaNova.DataList
using (var ct = AyaNova.Util.ServiceProviderProvider.DBContext)
{
var fc = ct.FormCustom.AsNoTracking().SingleOrDefault(z => z.FormKey == ayatypename);
//This is normal and expected in an empty db, removing this block
// #if (DEBUG)
// if (fc == null)
// {
// throw new System.ArgumentNullException($"AyaDataList:GetCustomFieldDefinitionsForList, Custom field object type {ayatypename} has no FormCustom defined");
// }
// #endif
//production handling of missing formcustom
//normal condition
if (fc == null)
continue;
@@ -224,47 +196,6 @@ namespace AyaNova.DataList
}
}
}
/*{[
{
"fld": "Notes",
"required": true
},
{
"fld": "WidgetCustom1",
"required": false,
"type": 1
},
{
"fld": "WidgetCustom2",
"required": true,
"type": 4
},
{
"fld": "WidgetCustom3",
"required": false,
"type": 5
},
{
"fld": "WidgetCustom4",
"required": false,
"type": 6
},
{
"fld": "WidgetCustom5",
"required": false,
"type": 8
},
{
"fld": "WidgetCustom6",
"required": false,
"type": 2
},
{
"fld": "WidgetCustom7",
"required": false,
"type": 3
}
]}*/
return ret;
}