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

@@ -7,39 +7,12 @@ namespace AyaNova.DataList
{
public ReminderDataList()
{
DefaultListObjectType = AyaType.Reminder;
SQLFrom = "from areminder";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
// dynamic dlistView = new JArray();
// dynamic cm = new JObject();
// cm.fld = "ReminderName";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "ReminderNotes";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "ReminderStopDate";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "ReminderStartDate";
// dlistView.Add(cm);
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() { "ReminderName", "ReminderNotes", "ReminderStopDate", "ReminderStartDate" };
DefaultSortBy = new Dictionary<string, string>() { { "ReminderStopDate", "-" } };
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely
FieldDefinitions = new List<DataListFieldDefinition>();
FieldDefinitions.Add(new DataListFieldDefinition
@@ -62,7 +35,6 @@ namespace AyaNova.DataList
SqlValueColumnName = "areminder.notes"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "ReminderStartDate",
@@ -113,7 +85,6 @@ namespace AyaNova.DataList
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ReminderCustom14", FieldKey = "ReminderCustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "areminder.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ReminderCustom15", FieldKey = "ReminderCustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "areminder.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "ReminderCustom16", FieldKey = "ReminderCustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "areminder.customfields" });
}
//Ensure only current user can fetch their reminders