This commit is contained in:
@@ -4,13 +4,19 @@ using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class EventDataList : AyaDataList
|
||||
{
|
||||
{/*
|
||||
Select aevent.id, aevent.created, aevent.ayid, aevent.ayatype, aevent.ayevent,
|
||||
aevent.textra, auser.name, auser.id
|
||||
from aevent
|
||||
left outer join auser on (aevent.userid=auser.id)
|
||||
|
||||
*/
|
||||
|
||||
public EventDataList()
|
||||
{
|
||||
//NOTE: used this type because it's full BizFull and read only BizLimited only which is appropriate and there is no event type
|
||||
DefaultListObjectType = AyaType.Global;
|
||||
SQLFrom = "from aevent";
|
||||
SQLFrom = "from aevent left outer join auser on (aevent.userid=auser.id)";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
|
||||
@@ -18,122 +24,77 @@ namespace AyaNova.DataList
|
||||
dynamic dlistView = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
cm.fld = "eventcreated";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "event";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "ayatype";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "username";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "useremployeenumber";
|
||||
cm.fld = "textra";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "usertype";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "useractive";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "userlastlogin";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "userroles";
|
||||
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 (in this case User) table need to be specified completely
|
||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||
//DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.User, SqlIdColumnName = "auser.id" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "User",
|
||||
FieldKey = "username",
|
||||
AyaObjectType = (int)AyaType.User,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlIdColumnName = "auser.id",
|
||||
SqlValueColumnName = "auser.name",
|
||||
IsRowId = true
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "Active",
|
||||
FieldKey = "useractive",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "auser.active"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "AuthorizationRoles",
|
||||
FieldKey = "userroles",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()),
|
||||
SqlValueColumnName = "auser.roles"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "LastLogin",
|
||||
FieldKey = "userlastlogin",
|
||||
TKey = "EventCreated",
|
||||
FieldKey = "eventcreated",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "auser.lastlogin"
|
||||
SqlValueColumnName = "aevent.created"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "UserType",
|
||||
FieldKey = "usertype",
|
||||
TKey = "Event",
|
||||
FieldKey = "event",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(UserType).ToString()),
|
||||
SqlValueColumnName = "auser.usertype"
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaEvent).ToString()),
|
||||
SqlValueColumnName = "aevent.ayevent"
|
||||
});
|
||||
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "AyaType",
|
||||
FieldKey = "ayatype",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
||||
SqlValueColumnName = "aevent.ayatype",
|
||||
SqlIdColumnName = "aevent.ayid"//Test to see if can make this column openable
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "UserEmployeeNumber",
|
||||
FieldKey = "useremployeenumber",
|
||||
FieldKey = "username",
|
||||
TKey = "User",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "auser.employeenumber"
|
||||
AyaObjectType = (int)AyaType.User,
|
||||
SqlIdColumnName = "auser.id",
|
||||
SqlValueColumnName = "auser.name"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "UserNotes",
|
||||
FieldKey = "usernotes",
|
||||
TKey = "EventTextra",
|
||||
FieldKey = "textra",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "auser.notes"
|
||||
SqlValueColumnName = "aevent.textra"
|
||||
});
|
||||
|
||||
|
||||
// //-------------------------
|
||||
//NOT SURE ABOUT CUSTOM FIELDS
|
||||
//NEED TO COME BACK TO THIS ONCE CLIENT IS CONSUMING THESE LISTS
|
||||
//WIDGETLIST has custom fields so good test before doing here
|
||||
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom1", FieldKey = "widgetcustom1", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom2", FieldKey = "widgetcustom2", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom3", FieldKey = "widgetcustom3", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom4", FieldKey = "widgetcustom4", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom5", FieldKey = "widgetcustom5", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom6", FieldKey = "widgetcustom6", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom7", FieldKey = "widgetcustom7", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom8", FieldKey = "widgetcustom8", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom9", FieldKey = "widgetcustom9", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom10", FieldKey = "widgetcustom10", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom11", FieldKey = "widgetcustom11", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom12", FieldKey = "widgetcustom12", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom13", FieldKey = "widgetcustom13", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom14", FieldKey = "widgetcustom14", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom15", FieldKey = "widgetcustom15", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom16", FieldKey = "widgetcustom16", IsCustomField = true });
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
@@ -1638,6 +1638,7 @@
|
||||
"ServerStateReason": "Grund",
|
||||
"TooManyResults": "Zu viele Ergebnisse, um alle anzuzeigen",
|
||||
"NoResults": "Keine Ergebnisse",
|
||||
"EventTextra": "Anmerkungen",
|
||||
"EventDeleted": "Gelöscht",
|
||||
"EventCreated": "Erstellt",
|
||||
"EventRetrieved": "Abgerufen",
|
||||
@@ -1843,5 +1844,6 @@
|
||||
"AyaType":"Typ",
|
||||
"StartAttachmentMaintenanceJob":"Starten Sie den Wartungsjob für Dateianhänge",
|
||||
"MoveSelected":"Verschieben Sie ausgewählte Elemente",
|
||||
"DeleteSelected":"Ausgewählte Elemente löschen"
|
||||
"DeleteSelected":"Ausgewählte Elemente löschen",
|
||||
"Event":"Veranstaltung"
|
||||
}
|
||||
@@ -1638,6 +1638,7 @@
|
||||
"ServerStateReason": "Reason",
|
||||
"TooManyResults": "Too many results to show all",
|
||||
"NoResults": "No results",
|
||||
"EventTextra": "Notes",
|
||||
"EventDeleted": "Deleted",
|
||||
"EventCreated": "Created",
|
||||
"EventRetrieved": "Retrieved",
|
||||
@@ -1843,7 +1844,8 @@
|
||||
"AyaType":"Type",
|
||||
"StartAttachmentMaintenanceJob":"Start attachment maintenance job",
|
||||
"MoveSelected":"Move selected items",
|
||||
"DeleteSelected":"Delete selected items"
|
||||
"DeleteSelected":"Delete selected items",
|
||||
"Event":"Event"
|
||||
|
||||
|
||||
}
|
||||
@@ -1638,6 +1638,7 @@
|
||||
"ServerStateReason": "Razón",
|
||||
"TooManyResults": "Demasiados resultados para mostrar todos",
|
||||
"NoResults": "No hay resultados",
|
||||
"EventTextra": "Notas",
|
||||
"EventDeleted": "Eliminado",
|
||||
"EventCreated": "Creado",
|
||||
"EventRetrieved": "Recuperados",
|
||||
@@ -1843,5 +1844,6 @@
|
||||
"AyaType":"Tipo",
|
||||
"StartAttachmentMaintenanceJob":"Iniciar trabajo de mantenimiento de archivos adjuntos",
|
||||
"MoveSelected":"Mover elementos seleccionados",
|
||||
"DeleteSelected":"Eliminar elementos seleccionados"
|
||||
"DeleteSelected":"Eliminar elementos seleccionados",
|
||||
"Event":"Evento"
|
||||
}
|
||||
@@ -1638,6 +1638,7 @@
|
||||
"ServerStateReason": "Objectif",
|
||||
"TooManyResults": "Trop de résultats pour tout montrer",
|
||||
"NoResults": "Aucun résultat",
|
||||
"EventTextra": "Remarques",
|
||||
"EventDeleted": "Supprimé",
|
||||
"EventCreated": "Créé",
|
||||
"EventRetrieved": "Récupéré",
|
||||
@@ -1843,5 +1844,6 @@
|
||||
"AyaType": "Type",
|
||||
"StartAttachmentMaintenanceJob": "Démarrer le travail de maintenance des pièces jointes",
|
||||
"MoveSelected":"Déplacer les éléments sélectionnés",
|
||||
"DeleteSelected":"Supprimer les éléments sélectionnés"
|
||||
"DeleteSelected":"Supprimer les éléments sélectionnés",
|
||||
"Event":"Un événement"
|
||||
}
|
||||
Reference in New Issue
Block a user