From 77cb0ef98a36e3dc9830d9d47fceae08846637ff Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 27 Jan 2021 20:23:47 +0000 Subject: [PATCH] --- .../AyaNova/DataList/CustomerNoteDataList.cs | 1 - .../CustomerServiceRequestDataList.cs | 45 ++++++++--------- server/AyaNova/DataList/EventDataList.cs | 48 ++++++++++--------- 3 files changed, 48 insertions(+), 46 deletions(-) diff --git a/server/AyaNova/DataList/CustomerNoteDataList.cs b/server/AyaNova/DataList/CustomerNoteDataList.cs index 71996530..5b55efa0 100644 --- a/server/AyaNova/DataList/CustomerNoteDataList.cs +++ b/server/AyaNova/DataList/CustomerNoteDataList.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Newtonsoft.Json.Linq; using AyaNova.Biz; using AyaNova.Models; diff --git a/server/AyaNova/DataList/CustomerServiceRequestDataList.cs b/server/AyaNova/DataList/CustomerServiceRequestDataList.cs index 2d104a58..b9bda3b2 100644 --- a/server/AyaNova/DataList/CustomerServiceRequestDataList.cs +++ b/server/AyaNova/DataList/CustomerServiceRequestDataList.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Newtonsoft.Json.Linq; using AyaNova.Biz; namespace AyaNova.DataList { @@ -17,34 +16,36 @@ namespace AyaNova.DataList var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType); AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; - //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############ - //Default ListView - dynamic dlistView = new JArray(); - dynamic cm = null; + // //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############ + // //Default ListView + // dynamic dlistView = new JArray(); + // dynamic cm = null; - cm = new JObject(); - cm.fld = "Created"; - cm.sort = "-"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "Created"; + // cm.sort = "-"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "Customer"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "Customer"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "CustomerServiceRequestTitle"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "CustomerServiceRequestTitle"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "CustomerServiceRequestPriority"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "CustomerServiceRequestPriority"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "CustomerServiceRequestStatus"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "CustomerServiceRequestStatus"; + // dlistView.Add(cm); - DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); + // DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); + DefaultColumns = new List() { "Created", "Customer", "CustomerServiceRequestTitle", "CustomerServiceRequestPriority", "CustomerServiceRequestStatus" }; + DefaultSortBy = new Dictionary() { { "Created", "-" } }; //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(); diff --git a/server/AyaNova/DataList/EventDataList.cs b/server/AyaNova/DataList/EventDataList.cs index 5dcd0ced..bbbd7dcb 100644 --- a/server/AyaNova/DataList/EventDataList.cs +++ b/server/AyaNova/DataList/EventDataList.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Newtonsoft.Json.Linq; using AyaNova.Biz; namespace AyaNova.DataList { @@ -20,36 +19,39 @@ namespace AyaNova.DataList var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType); AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; - //Default ListView - dynamic dlistView = new JArray(); + // //Default ListView + // dynamic dlistView = new JArray(); - dynamic cm = new JObject(); - cm.fld = "eventcreated"; - cm.sort = "-"; - dlistView.Add(cm); + // dynamic cm = new JObject(); + // cm.fld = "eventcreated"; + // cm.sort = "-"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "event"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "event"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "object"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "object"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "AyaType"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "AyaType"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "username"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "username"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "textra"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "textra"; + // dlistView.Add(cm); - DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); + // DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); + + DefaultColumns = new List() { "eventcreated", "event", "object", "AyaType", "username", "textra" }; + DefaultSortBy = new Dictionary() { { "eventcreated", "-" } }; FieldDefinitions = new List();