This commit is contained in:
@@ -30,7 +30,7 @@ IMPLEMENTATION PATH / PLAN - code as minimal a route as possible to get to worki
|
||||
should it submit and send immediately bypassing generator as just an immediate test.
|
||||
OR
|
||||
maybe it's an option for the user to choose.
|
||||
|
||||
|
||||
widget / user crud ops and tag filtered in both App and in smtp
|
||||
Then viewed in UI and worked with, properly shows count waiting etc
|
||||
Examine system, bulletproof it as much as possible from first impressions
|
||||
@@ -40,6 +40,20 @@ IMPLEMENTATION PATH / PLAN - code as minimal a route as possible to get to worki
|
||||
todo: Make the notification subscription front end page
|
||||
At least enough to subscription to widget biz notifications
|
||||
with translation keys
|
||||
route needed of existing subs
|
||||
route to add sub
|
||||
route to delete sub
|
||||
ui list of subs editable and saveable as a collection?
|
||||
biz object
|
||||
do it like widgets list and widget items, list up front and edit behind
|
||||
TODO:
|
||||
Do from front end back to server
|
||||
SubscriptionList datalist needed first
|
||||
timespan ui type for grid display
|
||||
then edit form and routes can be added
|
||||
Going to need a timespan control for editing
|
||||
|
||||
|
||||
todo: make the ops notification front end page
|
||||
todo: make the biz notification page
|
||||
todo: implement the Widget and User crud notification systems as per spec with an eye to replicating everywhere and allowing for specialty other types in system
|
||||
|
||||
138
server/AyaNova/DataList/NotifySubscriptionDataList.cs
Normal file
138
server/AyaNova/DataList/NotifySubscriptionDataList.cs
Normal file
@@ -0,0 +1,138 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class NotifySubscriptionDataList : AyaDataList
|
||||
{
|
||||
|
||||
public NotifySubscriptionDataList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.NotifySubscription;
|
||||
SQLFrom = "from auser";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
|
||||
//Default ListView
|
||||
dynamic dlistView = new JArray();
|
||||
|
||||
dynamic cm = new JObject();
|
||||
cm.fld = "username";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "useremployeenumber";
|
||||
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 NotifySubscription) table need to be specified completely
|
||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||
//DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.NotifySubscription, SqlIdColumnName = "auser.id" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "NotifySubscription",
|
||||
FieldKey = "username",
|
||||
AyaObjectType = (int)AyaType.NotifySubscription,
|
||||
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",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "auser.lastlogin"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "NotifySubscriptionType",
|
||||
FieldKey = "usertype",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(NotifySubscriptionType).ToString()),
|
||||
SqlValueColumnName = "auser.usertype"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "NotifySubscriptionEmployeeNumber",
|
||||
FieldKey = "useremployeenumber",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "auser.employeenumber"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "NotifySubscriptionNotes",
|
||||
FieldKey = "usernotes",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "auser.notes"
|
||||
});
|
||||
|
||||
|
||||
// //-------------------------
|
||||
//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
|
||||
@@ -107,7 +107,7 @@ namespace AyaNova.Biz
|
||||
BizMetrics=48,
|
||||
Backup=49,
|
||||
Notification=50,
|
||||
NotificationSubscription=51
|
||||
NotifySubscription=51
|
||||
|
||||
|
||||
//NOTE: New objects added here need to also be added to the following classes:
|
||||
|
||||
@@ -528,7 +528,7 @@ namespace AyaNova.Biz
|
||||
////////////////////////////////////////////////////////////
|
||||
//NOTIFICATION_SUBSCRIPTION
|
||||
//
|
||||
roles.Add(AyaType.NotificationSubscription, new BizRoleSet()
|
||||
roles.Add(AyaType.NotifySubscription, new BizRoleSet()
|
||||
{
|
||||
Change = AuthorizationRoles.All,
|
||||
ReadFullRecord = AuthorizationRoles.All
|
||||
|
||||
Reference in New Issue
Block a user