This commit is contained in:
@@ -50,6 +50,8 @@ namespace AyaNova.PickList
|
||||
return new WorkOrderTemplatePickList() as IAyaPickList;
|
||||
case AyaType.TaskGroup:
|
||||
return new TaskGroupPickList() as IAyaPickList;
|
||||
case AyaType.Report:
|
||||
return new ReportPickList() as IAyaPickList;
|
||||
|
||||
default:
|
||||
throw new System.NotImplementedException($"PICKLIST {ayaType} NOT IMPLEMENTED");
|
||||
|
||||
56
server/AyaNova/PickList/ReportPickList.cs
Normal file
56
server/AyaNova/PickList/ReportPickList.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.PickList
|
||||
{
|
||||
internal class ReportPickList : AyaPickList, IAyaPickListVariant
|
||||
{
|
||||
public ReportPickList()
|
||||
{
|
||||
|
||||
DefaultListAType = AyaType.Report;
|
||||
SQLFrom = "from areport";
|
||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||
dynamic dTemplate = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
cm.fld = "name";
|
||||
dTemplate.Add(cm);
|
||||
|
||||
base.DefaultTemplate = dTemplate.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
|
||||
ColumnDefinitions = new List<AyaPickListFieldDefinition>();
|
||||
ColumnDefinitions.Add(new AyaPickListFieldDefinition
|
||||
{
|
||||
TKey = "Active",
|
||||
FieldKey = "useractive",
|
||||
ColumnDataType = UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "auser.active",
|
||||
IsActiveColumn = true
|
||||
});
|
||||
ColumnDefinitions.Add(new AyaPickListFieldDefinition
|
||||
{
|
||||
TKey = "Name",
|
||||
FieldKey = "username",
|
||||
ColumnDataType = UiFieldDataType.Text,
|
||||
SqlIdColumnName = "auser.id",
|
||||
SqlValueColumnName = "auser.name",
|
||||
IsRowId = true
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public string GetVariantCriteria(string variant)
|
||||
{
|
||||
//has for type variant
|
||||
if (string.IsNullOrWhiteSpace(variant))
|
||||
return string.Empty;
|
||||
|
||||
int forType;
|
||||
if (!int.TryParse(variant, out forType))
|
||||
return string.Empty;
|
||||
return $"areport.atype={forType}";
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
@@ -2263,5 +2263,7 @@
|
||||
"NetPrice":"Nettopreis",
|
||||
"BusinessSettings":"Geschäftseinstellungen",
|
||||
"CustomerAccessSettings": "Kundenzugriffseinstellungen",
|
||||
"CustomerAccessWorkOrderWiki":"Arbeitsauftragskopf anzeigen WIKI"
|
||||
"CustomerAccessWorkOrderWiki":"Arbeitsauftragskopf anzeigen WIKI",
|
||||
"CSRInfoHTML":"Kundenservice-Anfrageinfo HTML",
|
||||
"CustomerAccessWorkOrderReport":"Kundenversion Arbeitsauftragsbericht"
|
||||
}
|
||||
@@ -2263,7 +2263,9 @@
|
||||
"NetPrice": "Net price",
|
||||
"BusinessSettings":"Business",
|
||||
"CustomerAccessSettings": "Customer access",
|
||||
"CustomerAccessWorkOrderWiki":"View work order header WIKI"
|
||||
"CustomerAccessWorkOrderWiki":"View work order header WIKI",
|
||||
"CSRInfoHTML":"CSR info HTML",
|
||||
"CustomerAccessWorkOrderReport":"Customer work order report"
|
||||
|
||||
|
||||
}
|
||||
@@ -2263,5 +2263,7 @@
|
||||
"NetPrice":"Precio neto",
|
||||
"BusinessSettings":"Configuración empresarial",
|
||||
"CustomerAccessSettings": "Configuración de acceso de clientes",
|
||||
"CustomerAccessWorkOrderWiki":"Ver el encabezado de la orden de trabajo WIKI"
|
||||
"CustomerAccessWorkOrderWiki":"Ver el encabezado de la orden de trabajo WIKI",
|
||||
"CSRInfoHTML":"Información HTML de solicitud de servicio al cliente",
|
||||
"CustomerAccessWorkOrderReport":"Informe de orden de trabajo del cliente"
|
||||
}
|
||||
@@ -2263,5 +2263,7 @@
|
||||
"NetPrice":"Prix net",
|
||||
"BusinessSettings":"Paramètres commerciaux",
|
||||
"CustomerAccessSettings": "Paramètres d'accès client",
|
||||
"CustomerAccessWorkOrderWiki":"Voir l'en-tête de l'ordre de travail WIKI"
|
||||
"CustomerAccessWorkOrderWiki":"Voir l'en-tête de l'ordre de travail WIKI",
|
||||
"CSRInfoHTML":"Informations sur la demande de service client HTML",
|
||||
"CustomerAccessWorkOrderReport":"Rapport de bon de travail client"
|
||||
}
|
||||
Reference in New Issue
Block a user