This commit is contained in:
2021-09-07 17:56:12 +00:00
parent 60a6bccc4c
commit ccfe625528
2 changed files with 27 additions and 2 deletions

View File

@@ -10,7 +10,9 @@ namespace AyaNova.DataList
public InsideUserDataList()
{
DefaultListAType = AyaType.User;
SQLFrom = "from auser left join avendor on (auser.vendorid=avendor.id)";
SQLFrom = "from auser left join avendor on (auser.vendorid=avendor.id) "
+ "left join auseroptions on auser.id=auseroptions.userid "
+ "left join atranslation on auseroptions.translationid = atranslation.id";
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
DefaultColumns = new List<string>() { "name", "employeenumber", "active", "usertype", "lastlogin" };
@@ -90,6 +92,16 @@ namespace AyaNova.DataList
SqlValueColumnName = "auser.twofactorenabled"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Translation",
FieldKey = "Translation",
UiFieldDataType = (int)UiFieldDataType.Text,
AType = (int)AyaType.Translation,
SqlIdColumnName = "atranslation.id",
SqlValueColumnName = "atranslation.name"
});
//META COLUMNS
FieldDefinitions.Add(new DataListFieldDefinition

View File

@@ -9,7 +9,10 @@ namespace AyaNova.DataList
public OutsideUserDataList()
{
DefaultListAType = AyaType.Customer;
SQLFrom = "from auser left join aheadoffice on (auser.headofficeid=aheadoffice.id) left join acustomer on (auser.customerid=acustomer.id)";
SQLFrom = "from auser left join aheadoffice on (auser.headofficeid=aheadoffice.id) "
+ "left join acustomer on (auser.customerid=acustomer.id)"
+ "left join auseroptions on auser.id=auseroptions.userid "
+ "left join atranslation on auseroptions.translationid = atranslation.id";
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
DefaultColumns = new List<string>() { "name", "active", "usercustomer", "userheadoffice", "lastlogin" };
@@ -98,6 +101,16 @@ namespace AyaNova.DataList
SqlValueColumnName = "auser.twofactorenabled"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Translation",
FieldKey = "Translation",
UiFieldDataType = (int)UiFieldDataType.Text,
AType = (int)AyaType.Translation,
SqlIdColumnName = "atranslation.id",
SqlValueColumnName = "atranslation.name"
});
//META COLUMNS
FieldDefinitions.Add(new DataListFieldDefinition
{