This commit is contained in:
@@ -15,43 +15,45 @@ namespace AyaNova.DataList
|
||||
|
||||
//Default ListView
|
||||
dynamic dlistView = new JArray();
|
||||
dynamic cm=new JObject();
|
||||
cm.fld="widgetname";
|
||||
dlistView.Add(cm);
|
||||
cm=new JObject();
|
||||
cm.fld="widgetname";
|
||||
|
||||
dynamic cm = new JObject();
|
||||
cm.fld = "widgetname";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm=new JObject();
|
||||
cm.fld="widgetname";
|
||||
cm = new JObject();
|
||||
cm.fld = "widgetserial";
|
||||
dlistView.Add(cm);
|
||||
cm=new JObject();
|
||||
cm.fld="widgetname";
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "widgetdollaramount";
|
||||
dlistView.Add(cm);
|
||||
cm=new JObject();
|
||||
cm.fld="widgetname";
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "widgetusertype";
|
||||
dlistView.Add(cm);
|
||||
cm=new JObject();
|
||||
cm.fld="widgetname";
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "widgetstartdate";
|
||||
dlistView.Add(cm);
|
||||
cm=new JObject();
|
||||
cm.fld="widgetname";
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "widgetactive";
|
||||
dlistView.Add(cm);
|
||||
finish this
|
||||
// //name starts with filter to constrict to widgets that this test block created only
|
||||
// dynamic DataFilterNameStart = new JObject();
|
||||
// DataFilterNameStart.fld = "widgetname";
|
||||
// DataFilterNameStart.op = Util.OpStartsWith;
|
||||
// DataFilterNameStart.value = WidgetNameStart;
|
||||
// dfilter.Add(DataFilterNameStart);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "username";
|
||||
dlistView.Add(cm);
|
||||
|
||||
DefaultListView = dlistView.ToString();
|
||||
|
||||
|
||||
|
||||
// DefaultDataListView = @"
|
||||
// {
|
||||
// [{key:""COLUMN UNIQUE KEY ID",sort:"-" or "+",filter:{any:true/false,items:[{FILTER OBJECT SEE BELOW}]} }, {key:"second column unique key"},{...etc...}]
|
||||
|
||||
|
||||
// ""full"":[""widgetname"",""widgetserial"",""widgetdollaramount"",""widgetusertype"",""widgetstartdate"",""widgetactive"",""username""],
|
||||
|
||||
|
||||
// }
|
||||
// ";
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
@@ -15,17 +16,31 @@ namespace AyaNova.DataList
|
||||
|
||||
public TestWidgetUserEmailDataList()
|
||||
{
|
||||
ListKey = nameof(TestWidgetUserEmailDataList);
|
||||
|
||||
SQLFrom = "from awidget left outer join auser on (awidget.userid=auser.id) left outer join auseroptions on (auser.id=auseroptions.userid)";
|
||||
FullListAllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).ReadFullRecord;
|
||||
MiniListAllowedRoles = AuthorizationRoles.AllExceptCustomers;//anyone but clients who shouldn't see users email addresses (so can select on forms)
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).ReadFullRecord;
|
||||
DefaultListObjectType = AyaType.Widget;
|
||||
DefaultDataListDisplayTemplate = @"
|
||||
{
|
||||
""full"":[""widgetname"",""username"",""emailaddress"",""widgetactive""],
|
||||
""mini"":[""widgetname"",""username"",""emailaddress""]
|
||||
}
|
||||
";
|
||||
//Default ListView
|
||||
dynamic dlistView = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
cm.fld = "widgetname";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "username";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "emailaddress";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "widgetactive";
|
||||
dlistView.Add(cm);
|
||||
|
||||
DefaultListView = dlistView.ToString();
|
||||
|
||||
|
||||
//NOTE: First field after df is used as the title above the narrow grid view so it should be the name of the item to be shown that is most identifiable
|
||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
@@ -8,16 +9,36 @@ namespace AyaNova.DataList
|
||||
public UserDataList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.User;
|
||||
ListKey = nameof(UserDataList);
|
||||
|
||||
SQLFrom = "from auser";
|
||||
FullListAllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).ReadFullRecord;
|
||||
MiniListAllowedRoles = AuthorizationRoles.All;//anyone (so can select on forms)
|
||||
DefaultDataListDisplayTemplate = @"
|
||||
{
|
||||
""full"":[""username"",""useremployeenumber"",""useractive"",""usernotes"",""userroles""],
|
||||
""mini"":[""username""]
|
||||
}
|
||||
";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).ReadFullRecord;
|
||||
|
||||
//Default ListView
|
||||
dynamic dlistView = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
cm.fld = "username";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "useremployeenumber";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "useractive";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "usernotes";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "userroles";
|
||||
dlistView.Add(cm);
|
||||
|
||||
DefaultListView = dlistView.ToString();
|
||||
|
||||
|
||||
|
||||
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined (in this case User) table need to be specified completely
|
||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||
|
||||
Reference in New Issue
Block a user