This commit is contained in:
2021-09-06 20:10:13 +00:00
parent 5c325dbe64
commit 5b0708eadc
4 changed files with 14 additions and 4 deletions

2
.vscode/launch.json vendored
View File

@@ -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\\"

View File

@@ -42,6 +42,9 @@ namespace AyaNova.DataList
//CLIENT / SERVER - client display and to indicate what object to open , Server for formatting return object
public int AType { get; set; }
//CLIENT - indicates client must translate the values in this column (typically computed columns based on aygetname procedure)
public bool Translate { get; set; }
//SERVER - for building sql queries
//don't return these properties when api user fetches field list definitions in DataListController
[JsonIgnore]
@@ -62,6 +65,7 @@ namespace AyaNova.DataList
IsSortable = true;
IsRowId = false;
IsMeta = false;
Translate=false;
//Set openable object type to no type which is the default and means it's not a link to another object
AType = (int)AyaType.NoType;
SqlATypeColumnName = null;//must be null as that is checked against specifically

View File

@@ -67,7 +67,7 @@ namespace AyaNova.DataList
}
public Newtonsoft.Json.Linq.JArray GenerateReturnListColumns(List<string> columns)
{
{
var CustomFieldDefinitions = GetCustomFieldDefinitionsForList();
//Generate JSON fragment to return with column definitions
@@ -133,10 +133,15 @@ namespace AyaNova.DataList
//Not Sortable?
if (!o.IsSortable)
sb.Append($",\"ns\":1");
//Not Filterable?
if (!o.IsFilterable)
sb.Append($",\"nf\":1");
//translate required?
if (o.Translate)
sb.Append($",\"tra\":1");
sb.Append("}");
FirstColumnAdded = true;

View File

@@ -27,9 +27,10 @@ namespace AyaNova.DataList
TKey = "PartInventoryTransactionSource",
FieldKey = "PartInventoryTransactionSource",
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "apartinventory.sourceid",
SqlIdColumnName = "apartinventory.sourceid",
SqlValueColumnName = "AYGETNAME(apartinventory.sourceid, apartinventory.sourcetype)",
SqlATypeColumnName = "apartinventory.sourcetype"
SqlATypeColumnName = "apartinventory.sourcetype",
Translate=true
});
FieldDefinitions.Add(new DataListFieldDefinition