This commit is contained in:
@@ -8,8 +8,8 @@ namespace AyaNova.DataList
|
||||
{
|
||||
switch (ListKey)
|
||||
{
|
||||
case nameof(TestWidgetUserEmail):
|
||||
return new TestWidgetUserEmail();
|
||||
case nameof(TestWidgetUserEmailDataList):
|
||||
return new TestWidgetUserEmailDataList();
|
||||
default:
|
||||
throw new System.ArgumentOutOfRangeException($"DataListFactory: Unknown list \"{ListKey}\"");
|
||||
}
|
||||
|
||||
@@ -14,7 +14,10 @@ namespace AyaNova.DataList
|
||||
List<AyaDataListFieldDefinition> FieldDefinitions { get; }
|
||||
|
||||
//allowed roles to access this list
|
||||
public AuthorizationRoles AllowedRoles { get; }
|
||||
AuthorizationRoles AllowedRoles { get; }
|
||||
|
||||
//Default object type to open for rows of this list (use no object if no)
|
||||
AyaType DefaultListObjectType { get; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,12 +2,18 @@ using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class TestWidgetUserEmail : IAyaDataList
|
||||
internal class TestWidgetUserEmailDataList : IAyaDataList
|
||||
{
|
||||
/*
|
||||
Select awidget.id, awidget.name, auser.name, auser.id, auseroptions.emailaddress
|
||||
from awidget
|
||||
left outer join auser on (awidget.userid=auser.id)
|
||||
left outer join auseroptions on (auser.id=auseroptions.userid)
|
||||
order by auseroptions.emailaddress desc
|
||||
*/
|
||||
public string ListKey => nameof(TestWidgetUserEmailDataList);
|
||||
|
||||
public string ListKey => nameof(TestWidgetUserEmail);
|
||||
|
||||
public string SQLFrom => "throw new System.NotImplementedException()";
|
||||
public string SQLFrom => "from awidget left outer join auser on (awidget.userid=auser.id) left outer join auseroptions on (auser.id=auseroptions.userid)";
|
||||
|
||||
public List<AyaDataListFieldDefinition> FieldDefinitions
|
||||
{
|
||||
@@ -52,6 +58,8 @@ namespace AyaNova.DataList
|
||||
}
|
||||
|
||||
public AuthorizationRoles AllowedRoles => AuthorizationRoles.AllInternalStaff;//anyone but clients and subcontractors (just for test)
|
||||
public AyaType DefaultListObjectType => AyaType.Widget;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user