This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||
|
||||
@@ -19,7 +19,7 @@ SERVER
|
||||
- BUMP AyaNova.csproj version number
|
||||
- BUILD RELEASE Run buildrelease.bat in server project folder
|
||||
|
||||
https://www.ayanova.com/Downloads/v8/ayanova8.alpha.112-win-x64.7z
|
||||
https://www.ayanova.com/Downloads/v8/ayanova8.alpha.114-win-x64.7z
|
||||
|
||||
- COPY TO DEVOPS SERVER
|
||||
NOTE: if need to replace "files" subfolder on server the rights need to be set to 775
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AyaNova.Biz;
|
||||
using AyaNova.Models;
|
||||
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class WorkOrderDataList : DataListProcessingBase
|
||||
internal class WorkOrderDataList : DataListProcessingBase, IDataListInternalCriteria
|
||||
{
|
||||
public WorkOrderDataList()
|
||||
{
|
||||
DefaultListAType = AyaType.WorkOrder;
|
||||
SQLFrom = "from aworkorder "
|
||||
// + "left join lateral (select id, workorderstatusid, workorderid from aworkorderstate st where workorderid = aworkorder.id order by st.id DESC limit 1) st on aworkorder.id=st.workorderid "
|
||||
// + "left join lateral (select id, workorderstatusid, workorderid from aworkorderstate st where workorderid = aworkorder.id order by st.id DESC limit 1) st on aworkorder.id=st.workorderid "
|
||||
+ "left join aworkorderstatus on (aworkorder.laststatusid = aworkorderstatus.id) "
|
||||
+ "left join acustomer on (aworkorder.customerid=acustomer.id) "
|
||||
+ "left join aheadoffice on (acustomer.headofficeid=aheadoffice.id) "
|
||||
@@ -58,7 +61,7 @@ namespace AyaNova.DataList
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
AType = (int)AyaType.WorkOrderStatus,
|
||||
SqlIdColumnName = "aworkorder.laststatusid",
|
||||
SqlColorColumnName = "aworkorderstatus.color",
|
||||
SqlColorColumnName = "aworkorderstatus.color",
|
||||
SqlValueColumnName = "aworkorderstatus.name"
|
||||
});
|
||||
|
||||
@@ -315,6 +318,71 @@ namespace AyaNova.DataList
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom14", FieldKey = "workordercustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom15", FieldKey = "workordercustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom16", FieldKey = "workordercustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
||||
|
||||
|
||||
//META COLUMNS
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
FieldKey = "metacustomer",
|
||||
UiFieldDataType = (int)UiFieldDataType.InternalId,
|
||||
SqlIdColumnName = "acustomer.id",
|
||||
SqlValueColumnName = "acustomer.id",
|
||||
IsMeta = true
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
FieldKey = "metaproject",
|
||||
UiFieldDataType = (int)UiFieldDataType.InternalId,
|
||||
SqlIdColumnName = "aproject.id",
|
||||
SqlValueColumnName = "aproject.id",
|
||||
IsMeta = true
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<DataListFilterOption> DataListInternalCriteria(long currentUserId, AuthorizationRoles userRoles, string clientCriteria)
|
||||
{
|
||||
List<DataListFilterOption> ret = new List<DataListFilterOption>();
|
||||
|
||||
//ClientCriteria format for this list is "OBJECTID,AYATYPE"
|
||||
var crit = (clientCriteria ?? "").Split(',').Select(z => z.Trim()).ToArray();
|
||||
if (crit.Length > 1)
|
||||
{
|
||||
//will be filtered from different types, show all workorders from Customer, Project and nothing else at this time (others but for sub lists like workorderitemunits etc)
|
||||
int nType = 0;
|
||||
if (!int.TryParse(crit[1], out nType)) return ret;
|
||||
AyaType forType = (AyaType)nType;
|
||||
if (forType != AyaType.Customer && forType != AyaType.Project) return ret;//only supports customer and project for now
|
||||
|
||||
long lId = 0;
|
||||
if (!long.TryParse(crit[0], out lId)) return ret;
|
||||
if (lId == 0) return ret;
|
||||
|
||||
//Have valid type, have an id, so filter away
|
||||
switch (forType)
|
||||
{
|
||||
case AyaType.Customer:
|
||||
{
|
||||
DataListFilterOption FilterOption = new DataListFilterOption() { Column = "metacustomer" };
|
||||
FilterOption.Items.Add(new DataListColumnFilter() { value = crit[0], op = DataListFilterComparisonOperator.Equality });
|
||||
ret.Add(FilterOption);
|
||||
}
|
||||
break;
|
||||
case AyaType.Project:
|
||||
{
|
||||
DataListFilterOption FilterOption = new DataListFilterOption() { Column = "metaproject" };
|
||||
FilterOption.Items.Add(new DataListColumnFilter() { value = crit[0], op = DataListFilterComparisonOperator.Equality });
|
||||
ret.Add(FilterOption);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
@@ -5,7 +5,7 @@ namespace AyaNova.Util
|
||||
/// </summary>
|
||||
internal static class AyaNovaVersion
|
||||
{
|
||||
public const string VersionString = "8.0.0-alpha.114";
|
||||
public const string VersionString = "8.0.0-alpha.115";
|
||||
public const string FullNameAndVersion = "AyaNova server " + VersionString;
|
||||
}//eoc
|
||||
}//eons
|
||||
Reference in New Issue
Block a user