This commit is contained in:
@@ -15,43 +15,45 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
//Default ListView
|
//Default ListView
|
||||||
dynamic dlistView = new JArray();
|
dynamic dlistView = new JArray();
|
||||||
dynamic cm=new JObject();
|
|
||||||
cm.fld="widgetname";
|
dynamic cm = new JObject();
|
||||||
dlistView.Add(cm);
|
cm.fld = "widgetname";
|
||||||
cm=new JObject();
|
|
||||||
cm.fld="widgetname";
|
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
cm=new JObject();
|
cm = new JObject();
|
||||||
cm.fld="widgetname";
|
cm.fld = "widgetserial";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
cm=new JObject();
|
|
||||||
cm.fld="widgetname";
|
cm = new JObject();
|
||||||
|
cm.fld = "widgetdollaramount";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
cm=new JObject();
|
|
||||||
cm.fld="widgetname";
|
cm = new JObject();
|
||||||
|
cm.fld = "widgetusertype";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
cm=new JObject();
|
|
||||||
cm.fld="widgetname";
|
cm = new JObject();
|
||||||
|
cm.fld = "widgetstartdate";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
cm=new JObject();
|
|
||||||
cm.fld="widgetname";
|
cm = new JObject();
|
||||||
|
cm.fld = "widgetactive";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
finish this
|
|
||||||
// //name starts with filter to constrict to widgets that this test block created only
|
cm = new JObject();
|
||||||
// dynamic DataFilterNameStart = new JObject();
|
cm.fld = "username";
|
||||||
// DataFilterNameStart.fld = "widgetname";
|
dlistView.Add(cm);
|
||||||
// DataFilterNameStart.op = Util.OpStartsWith;
|
|
||||||
// DataFilterNameStart.value = WidgetNameStart;
|
DefaultListView = dlistView.ToString();
|
||||||
// dfilter.Add(DataFilterNameStart);
|
|
||||||
|
|
||||||
|
|
||||||
// DefaultDataListView = @"
|
// DefaultDataListView = @"
|
||||||
// {
|
// {
|
||||||
// [{key:""COLUMN UNIQUE KEY ID",sort:"-" or "+",filter:{any:true/false,items:[{FILTER OBJECT SEE BELOW}]} }, {key:"second column unique key"},{...etc...}]
|
// [{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""],
|
// ""full"":[""widgetname"",""widgetserial"",""widgetdollaramount"",""widgetusertype"",""widgetstartdate"",""widgetactive"",""username""],
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// ";
|
// ";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
@@ -15,17 +16,31 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
public TestWidgetUserEmailDataList()
|
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)";
|
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;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).ReadFullRecord;
|
||||||
MiniListAllowedRoles = AuthorizationRoles.AllExceptCustomers;//anyone but clients who shouldn't see users email addresses (so can select on forms)
|
|
||||||
DefaultListObjectType = AyaType.Widget;
|
DefaultListObjectType = AyaType.Widget;
|
||||||
DefaultDataListDisplayTemplate = @"
|
//Default ListView
|
||||||
{
|
dynamic dlistView = new JArray();
|
||||||
""full"":[""widgetname"",""username"",""emailaddress"",""widgetactive""],
|
|
||||||
""mini"":[""widgetname"",""username"",""emailaddress""]
|
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
|
//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>();
|
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
@@ -8,16 +9,36 @@ namespace AyaNova.DataList
|
|||||||
public UserDataList()
|
public UserDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.User;
|
DefaultListObjectType = AyaType.User;
|
||||||
ListKey = nameof(UserDataList);
|
|
||||||
SQLFrom = "from auser";
|
SQLFrom = "from auser";
|
||||||
FullListAllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).ReadFullRecord;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).ReadFullRecord;
|
||||||
MiniListAllowedRoles = AuthorizationRoles.All;//anyone (so can select on forms)
|
|
||||||
DefaultDataListDisplayTemplate = @"
|
//Default ListView
|
||||||
{
|
dynamic dlistView = new JArray();
|
||||||
""full"":[""username"",""useremployeenumber"",""useractive"",""usernotes"",""userroles""],
|
|
||||||
""mini"":[""username""]
|
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
|
//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>();
|
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||||
|
|||||||
Reference in New Issue
Block a user