From 9d64ab9560837a3e4926ad218596a71aa2c837fd Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 14 Jan 2021 19:43:20 +0000 Subject: [PATCH] --- .../AyaNova/DataList/PartAssemblyDataList.cs | 89 +++++++++++++++++++ server/AyaNova/resource/de.json | 18 +++- server/AyaNova/resource/en.json | 18 +++- server/AyaNova/resource/es.json | 20 ++++- server/AyaNova/resource/fr.json | 18 +++- 5 files changed, 158 insertions(+), 5 deletions(-) create mode 100644 server/AyaNova/DataList/PartAssemblyDataList.cs diff --git a/server/AyaNova/DataList/PartAssemblyDataList.cs b/server/AyaNova/DataList/PartAssemblyDataList.cs new file mode 100644 index 00000000..430c83e3 --- /dev/null +++ b/server/AyaNova/DataList/PartAssemblyDataList.cs @@ -0,0 +1,89 @@ +using System.Collections.Generic; +using Newtonsoft.Json.Linq; +using AyaNova.Biz; +namespace AyaNova.DataList +{ + internal class PartAssemblyDataList : AyaDataList + { + public PartAssemblyDataList() + { + DefaultListObjectType = AyaType.PartAssembly; + SQLFrom = "from apartassembly"; + var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType); + AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; + + //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############ + //Default ListView + dynamic dlistView = new JArray(); + dynamic cm = null; + + cm = new JObject(); + cm.fld = "partassemblyname"; + cm.sort = "+"; + dlistView.Add(cm); + + + DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); + + + //NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely + FieldDefinitions = new List(); + + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "PartAssemblyName", + FieldKey = "partassemblyname", + AyaObjectType = (int)AyaType.PartAssembly, + UiFieldDataType = (int)UiFieldDataType.Text, + SqlIdColumnName = "apartassembly.id", + SqlValueColumnName = "apartassembly.name", + IsRowId = true + }); + + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "PartAssemblyNotes", + FieldKey = "partassemblynotes", + UiFieldDataType = (int)UiFieldDataType.Text, + SqlValueColumnName = "apartassembly.notes" + }); + + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "Active", + FieldKey = "partassemblyactive", + UiFieldDataType = (int)UiFieldDataType.Bool, + SqlValueColumnName = "apartassembly.active" + }); + + FieldDefinitions.Add(new AyaDataListFieldDefinition + { + TKey = "Tags", + FieldKey = "partassemblytags", + UiFieldDataType = (int)UiFieldDataType.Tags, + SqlValueColumnName = "apartassembly.tags" + }); + + + + //----------- + + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom1", FieldKey = "partassemblycustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom2", FieldKey = "partassemblycustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom3", FieldKey = "partassemblycustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom4", FieldKey = "partassemblycustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom5", FieldKey = "partassemblycustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom6", FieldKey = "partassemblycustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom7", FieldKey = "partassemblycustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom8", FieldKey = "partassemblycustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom9", FieldKey = "partassemblycustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom10", FieldKey = "partassemblycustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom11", FieldKey = "partassemblycustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom12", FieldKey = "partassemblycustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom13", FieldKey = "partassemblycustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom14", FieldKey = "partassemblycustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom15", FieldKey = "partassemblycustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "PartAssemblyCustom16", FieldKey = "partassemblycustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apartassembly.customfields" }); + } + }//eoc +}//eons \ No newline at end of file diff --git a/server/AyaNova/resource/de.json b/server/AyaNova/resource/de.json index 6a985c17..7abb5ce3 100644 --- a/server/AyaNova/resource/de.json +++ b/server/AyaNova/resource/de.json @@ -385,7 +385,7 @@ "LoanUnitRateYear": "Jahresrate", "LoanUnitDefaultRate": "Standardrate", "LoanUnitSerial": "Seriennummer", - "LoanUnitShadowUnit":"Schatteneinheit", + "LoanUnitShadowUnit": "Schatteneinheit", "TranslationCustomizeText": "Customize text", "TranslationExport": "Gebietsschema in Datei exportieren", "TranslationImport": "Gebietsschema aus Datei importieren", @@ -597,6 +597,22 @@ "PartAssemblyDescription": "Beschreibung", "PartAssemblyList": "Teilebaugruppen", "PartAssemblyName": "Teilebaugruppe - Name", + "PartAssemblyCustom1": "Angepasstes Feld 1", + "PartAssemblyCustom2": "Angepasstes Feld 2", + "PartAssemblyCustom3": "Angepasstes Feld 3", + "PartAssemblyCustom4": "Angepasstes Feld 4", + "PartAssemblyCustom5": "Angepasstes Feld 5", + "PartAssemblyCustom6": "Angepasstes Feld 6", + "PartAssemblyCustom7": "Angepasstes Feld 7", + "PartAssemblyCustom8": "Angepasstes Feld 8", + "PartAssemblyCustom9": "Angepasstes Feld 9", + "PartAssemblyCustom10": "Angepasstes Feld 10", + "PartAssemblyCustom11": "Angepasstes Feld 11", + "PartAssemblyCustom12": "Angepasstes Feld 12", + "PartAssemblyCustom13": "Angepasstes Feld 13", + "PartAssemblyCustom14": "Angepasstes Feld 14", + "PartAssemblyCustom15": "Angepasstes Feld 15", + "PartAssemblyCustom16": "Angepasstes Feld 16", "PartByWarehouseInventoryList": "Teilebestand", "PartByWarehouseInventoryMinStockLevel": "Aufstockungsebene", "PartByWarehouseInventoryQtyOnOrderCommitted": "Zugesagte bestellte Menge", diff --git a/server/AyaNova/resource/en.json b/server/AyaNova/resource/en.json index b8bc5fe1..a7be350d 100644 --- a/server/AyaNova/resource/en.json +++ b/server/AyaNova/resource/en.json @@ -385,7 +385,7 @@ "LoanUnitRateYear": "Year rate", "LoanUnitDefaultRate": "Default rate", "LoanUnitSerial": "Serial number", - "LoanUnitShadowUnit":"Shadow Unit", + "LoanUnitShadowUnit": "Shadow Unit", "TranslationCustomizeText": "Customize text", "TranslationExport": "Export translation to file", "TranslationImport": "Import translation from file", @@ -597,6 +597,22 @@ "PartAssemblyDescription": "Description", "PartAssemblyList": "Part Assemblies", "PartAssemblyName": "Part Assembly Name", + "PartAssemblyCustom1": "Custom1", + "PartAssemblyCustom2": "Custom2", + "PartAssemblyCustom3": "Custom3", + "PartAssemblyCustom4": "Custom4", + "PartAssemblyCustom5": "Custom5", + "PartAssemblyCustom6": "Custom6", + "PartAssemblyCustom7": "Custom7", + "PartAssemblyCustom8": "Custom8", + "PartAssemblyCustom9": "Custom9", + "PartAssemblyCustom10": "Custom10", + "PartAssemblyCustom11": "Custom11", + "PartAssemblyCustom12": "Custom12", + "PartAssemblyCustom13": "Custom13", + "PartAssemblyCustom14": "Custom14", + "PartAssemblyCustom15": "Custom15", + "PartAssemblyCustom16": "Custom16", "PartByWarehouseInventoryList": "Part Inventory", "PartByWarehouseInventoryMinStockLevel": "Restock level", "PartByWarehouseInventoryQtyOnOrderCommitted": "Quantity on order committed", diff --git a/server/AyaNova/resource/es.json b/server/AyaNova/resource/es.json index f6546ad5..5995ca06 100644 --- a/server/AyaNova/resource/es.json +++ b/server/AyaNova/resource/es.json @@ -109,7 +109,7 @@ "CustomerServiceRequestStatusAccepted": "Accepted", "CustomerServiceRequestStatusClosed": "Closed", "CustomerServiceRequestStatusDeclined": "Declined", - "CustomerServiceRequestStatusOpen": "Open", + "CustomerServiceRequestStatusOpen": "Open", "CustomerServiceRequestCustom1": "Campo personalizado 1", "CustomerServiceRequestCustom2": "Campo personalizado 2", "CustomerServiceRequestCustom3": "Campo personalizado 3", @@ -385,7 +385,7 @@ "LoanUnitRateYear": "Tasa anual", "LoanUnitDefaultRate": "Tasa de incumplimiento", "LoanUnitSerial": "Número de serie", - "LoanUnitShadowUnit":"Unidad de sombra", + "LoanUnitShadowUnit": "Unidad de sombra", "TranslationCustomizeText": "Customize text", "TranslationExport": "Exportar localización en archivo", "TranslationImport": "Importar localización desde archivo", @@ -596,6 +596,22 @@ "PartAssemblyDescription": "Descripción", "PartAssemblyList": "Montajes de piezas", "PartAssemblyName": "Nombre de montaje de la pieza", + "PartAssemblyCustom1": "Campo personalizado 1", + "PartAssemblyCustom2": "Campo personalizado 2", + "PartAssemblyCustom3": "Campo personalizado 3", + "PartAssemblyCustom4": "Campo personalizado 4", + "PartAssemblyCustom5": "Campo personalizado 5", + "PartAssemblyCustom6": "Campo personalizado 6", + "PartAssemblyCustom7": "Campo personalizado 7", + "PartAssemblyCustom8": "Campo personalizado 8", + "PartAssemblyCustom9": "Campo personalizado 9", + "PartAssemblyCustom10": "Campo personalizado 10", + "PartAssemblyCustom11": "Campo personalizado 11", + "PartAssemblyCustom12": "Campo personalizado 12", + "PartAssemblyCustom13": "Campo personalizado 13", + "PartAssemblyCustom14": "Campo personalizado 14", + "PartAssemblyCustom15": "Campo personalizado 15", + "PartAssemblyCustom16": "Campo personalizado 16", "PartByWarehouseInventoryList": "Inventario de piezas", "PartByWarehouseInventoryMinStockLevel": "Nivel de reposición", "PartByWarehouseInventoryQtyOnOrderCommitted": "Cantidad en pedido comprometida", diff --git a/server/AyaNova/resource/fr.json b/server/AyaNova/resource/fr.json index e83963d3..efa6df3e 100644 --- a/server/AyaNova/resource/fr.json +++ b/server/AyaNova/resource/fr.json @@ -385,7 +385,7 @@ "LoanUnitRateYear": "Tarif annuel", "LoanUnitDefaultRate": "Taux de défaut", "LoanUnitSerial": "Numéro de série", - "LoanUnitShadowUnit":"Unité de l'ombre", + "LoanUnitShadowUnit": "Unité de l'ombre", "TranslationCustomizeText": "Customize text", "TranslationExport": "Exporter les paramètres régionaux dans le fichier", "TranslationImport": "Importer les paramètres régionaux du fichier", @@ -597,6 +597,22 @@ "PartAssemblyDescription": "Description", "PartAssemblyList": "Assemblages de pièces", "PartAssemblyName": "Nom d'assemblage de pièce", + "PartAssemblyCustom1": "Champ personnalisé 1", + "PartAssemblyCustom2": "Champ personnalisé 2", + "PartAssemblyCustom3": "Champ personnalisé 3", + "PartAssemblyCustom4": "Champ personnalisé 4", + "PartAssemblyCustom5": "Champ personnalisé 5", + "PartAssemblyCustom6": "Champ personnalisé 6", + "PartAssemblyCustom7": "Champ personnalisé 7", + "PartAssemblyCustom8": "Champ personnalisé 8", + "PartAssemblyCustom9": "Champ personnalisé 9", + "PartAssemblyCustom10": "Champ personnalisé 10", + "PartAssemblyCustom11": "Champ personnalisé 11", + "PartAssemblyCustom12": "Champ personnalisé 12", + "PartAssemblyCustom13": "Champ personnalisé 13", + "PartAssemblyCustom14": "Champ personnalisé 14", + "PartAssemblyCustom15": "Champ personnalisé 15", + "PartAssemblyCustom16": "Champ personnalisé 16", "PartByWarehouseInventoryList": "Stock de pièces", "PartByWarehouseInventoryMinStockLevel": "Niveau de réassortiment", "PartByWarehouseInventoryQtyOnOrderCommitted": "Quantité en commande validée",