rename all variants of naming that hold an AyaType value to "aType" (parameter) / "AType" (not parameter) everywhere front and back; "ayType", "objectType", "oType" all are used in various areas
This commit is contained in:
@@ -13,7 +13,7 @@ namespace AyaNova.PickList
|
||||
public string SQLFrom { get; set; }
|
||||
public List<AyaPickListFieldDefinition> ColumnDefinitions { get; set; }
|
||||
public AuthorizationRoles AllowedRoles { get; set; }
|
||||
public AyaType DefaultListObjectType { get; set; }
|
||||
public AyaType DefaultListAType { get; set; }
|
||||
public string DefaultTemplate { get; set; }
|
||||
//return array of field keys in list view
|
||||
public List<string> GetFieldListFromTemplate(JArray template)
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public ContractPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.Contract;
|
||||
DefaultListAType = AyaType.Contract;
|
||||
SQLFrom = "from acontract";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public CustomerPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.Customer;
|
||||
DefaultListAType = AyaType.Customer;
|
||||
SQLFrom = "from acustomer";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public HeadOfficePickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.HeadOffice;
|
||||
DefaultListAType = AyaType.HeadOffice;
|
||||
SQLFrom = "from aheadoffice";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace AyaNova.PickList
|
||||
//allowed roles to access this list
|
||||
AuthorizationRoles AllowedRoles { get; set; }
|
||||
//Default object type to open for rows of this list (use no object if no)
|
||||
AyaType DefaultListObjectType { get; set; }
|
||||
AyaType DefaultListAType { get; set; }
|
||||
//Default / STOCK template when none is specified
|
||||
string DefaultTemplate { get; set; }
|
||||
List<string> GetFieldListFromTemplate(JArray fieldListArray);
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public LoanUnitPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.LoanUnit;
|
||||
DefaultListAType = AyaType.LoanUnit;
|
||||
SQLFrom = "from aloanunit";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
dynamic cm = null;
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public PartAssemblyPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.PartAssembly;
|
||||
DefaultListAType = AyaType.PartAssembly;
|
||||
SQLFrom = "from apartassembly";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
dynamic cm = null;
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ namespace AyaNova.PickList
|
||||
public PartPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.Part;
|
||||
DefaultListAType = AyaType.Part;
|
||||
SQLFrom = "from apart "
|
||||
+ "left join avendor as amanufacturer on (apart.manufacturerid = amanufacturer.id) "
|
||||
+ "left join avendor as awholesaler on (apart.wholesalerid = awholesaler.id) "
|
||||
+ "left join avendor as aalternativewholesaler on (apart.alternativewholesalerid = aalternativewholesaler.id) ";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
dynamic cm = null;
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public PartWarehousePickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.PartWarehouse;
|
||||
DefaultListAType = AyaType.PartWarehouse;
|
||||
SQLFrom = "from apartwarehouse";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
dynamic cm = null;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace AyaNova.PickList
|
||||
//Sort out effective Template
|
||||
string Template = null;
|
||||
//Attempt to fetch custom template
|
||||
var t = await ct.PickListTemplate.FirstOrDefaultAsync(z => z.Id == ((long)PickList.DefaultListObjectType));
|
||||
var t = await ct.PickListTemplate.FirstOrDefaultAsync(z => z.Id == ((long)PickList.DefaultListAType));
|
||||
if (t == null)
|
||||
{
|
||||
Template = PickList.DefaultTemplate;
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace AyaNova.PickList
|
||||
AyaPickListFieldDefinition rowIdColumn = pickList.ColumnDefinitions.FirstOrDefault(z => z.IsRowId == true);
|
||||
//this should only happen with a development error
|
||||
if (rowIdColumn == null)
|
||||
throw new System.ArgumentNullException($"DEV ERROR in PickListSqlBuilder.cs: picklist for {pickList.DefaultListObjectType.ToString()} has no rowId column specified in columnDefinitions list");
|
||||
throw new System.ArgumentNullException($"DEV ERROR in PickListSqlBuilder.cs: picklist for {pickList.DefaultListAType.ToString()} has no rowId column specified in columnDefinitions list");
|
||||
PlIdSelectFragment = rowIdColumn.SqlIdColumnName + " as plId";
|
||||
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public ProjectPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.Project;
|
||||
DefaultListAType = AyaType.Project;
|
||||
SQLFrom = "from aproject";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
dynamic cm = null;
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace AyaNova.PickList
|
||||
public ServiceRatePickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.ServiceRate;
|
||||
DefaultListAType = AyaType.ServiceRate;
|
||||
SQLFrom = "from aservicerate";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public TaxCodePickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.TaxCode;
|
||||
DefaultListAType = AyaType.TaxCode;
|
||||
SQLFrom = "from ataxcode";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace AyaNova.PickList
|
||||
public TravelRatePickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.TravelRate;
|
||||
DefaultListAType = AyaType.TravelRate;
|
||||
SQLFrom = "from atravelrate";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public UnitModelPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.UnitModel;
|
||||
DefaultListAType = AyaType.UnitModel;
|
||||
SQLFrom = "from aunitmodel left join avendor on (aunitmodel.vendorid=avendor.id)";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
dynamic cm = null;
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ namespace AyaNova.PickList
|
||||
public UnitPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.Unit;
|
||||
DefaultListAType = AyaType.Unit;
|
||||
SQLFrom = "from aunit "
|
||||
+ "left join aunitmodel on (aunit.unitmodelid=aunitmodel.id) "
|
||||
+ "left join avendor on (aunitmodel.vendorid=avendor.id) ";
|
||||
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
dynamic cm = null;
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public UserPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.User;
|
||||
DefaultListAType = AyaType.User;
|
||||
SQLFrom = "from auser";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public VendorPickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.Vendor;
|
||||
DefaultListAType = AyaType.Vendor;
|
||||
SQLFrom = "from avendor";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace AyaNova.PickList
|
||||
{
|
||||
public WidgetPickList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.Widget;
|
||||
DefaultListAType = AyaType.Widget;
|
||||
SQLFrom = "from awidget left join auser on (awidget.userid=auser.id)";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
|
||||
//Default template
|
||||
dynamic dTemplate = new JArray();
|
||||
@@ -47,7 +47,7 @@ namespace AyaNova.PickList
|
||||
{
|
||||
TKey = "WidgetName",
|
||||
FieldKey = "widgetname",
|
||||
//AyaObjectType = AyaType.Widget,
|
||||
//AType = AyaType.Widget,
|
||||
ColumnDataType = UiFieldDataType.Text,
|
||||
SqlIdColumnName = "awidget.id",
|
||||
SqlValueColumnName = "awidget.name",
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
||||
public WorkOrderTemplatePickList()
|
||||
{
|
||||
|
||||
DefaultListObjectType = AyaType.WorkOrderTemplate;
|
||||
DefaultListAType = AyaType.WorkOrderTemplate;
|
||||
SQLFrom = "from aworkordertemplate";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
|
||||
Reference in New Issue
Block a user