This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
## IMMEDIATE ITEMS
|
||||
|
||||
|
||||
TODO: BizRoles.cs seems to get hammered on every single request, is it efficient?
|
||||
- Why is it not cached in some way?
|
||||
|
||||
TODO: HOw is it that I'm able to login and view widgets while the server is seeding?
|
||||
- shouldn't it be locked out for any non-ops actions?
|
||||
|
||||
@@ -71,7 +71,7 @@ nav:
|
||||
- 'Review': 'form-ay-review.md'
|
||||
- 'History': 'form-ay-history.md'
|
||||
- 'Customize': 'form-ay-customize.md'
|
||||
- 'Sort & filter': 'form-ay-sort-filter.md'
|
||||
- 'Data list view': 'form-ay-data-list-view.md'
|
||||
- 'Log': 'form-ay-log.md'
|
||||
- Customer:
|
||||
- 'Workorders': 'form-customer-workorders.md'
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace AyaNova.Biz
|
||||
case AyaType.FileAttachment:
|
||||
return await ct.FileAttachment.AnyAsync(m => m.Id == id);
|
||||
case AyaType.DataListView:
|
||||
return await ct.DataListSortFilter.AnyAsync(m => m.Id == id);
|
||||
return await ct.DataListView.AnyAsync(m => m.Id == id);
|
||||
|
||||
case AyaType.FormCustom:
|
||||
return await ct.FormCustom.AnyAsync(m => m.Id == id);
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace AyaNova.Biz
|
||||
|
||||
//ONGOING VALIDATION TO CATCH MISMATCH WHEN NEW ROLES ADDED (wont' catch changes to existing unfortunately)
|
||||
//var lastRoles = "{\"User\":{\"Change\":2,\"ReadFullRecord\":1},\"UserOptions\":{\"Change\":2,\"ReadFullRecord\":1},\"Widget\":{\"Change\":34,\"ReadFullRecord\":17},\"ServerState\":{\"Change\":16384,\"ReadFullRecord\":32767},\"License\":{\"Change\":16386,\"ReadFullRecord\":8193},\"LogFile\":{\"Change\":0,\"ReadFullRecord\":24576},\"JobOperations\":{\"Change\":16384,\"ReadFullRecord\":8195},\"AyaNova7Import\":{\"Change\":16384,\"ReadFullRecord\":0},\"Metrics\":{\"Change\":0,\"ReadFullRecord\":24576},\"Locale\":{\"Change\":16386,\"ReadFullRecord\":32767},\"DataListFilter\":{\"Change\":2,\"ReadFullRecord\":32767},\"FormCustom\":{\"Change\":2,\"ReadFullRecord\":32767}}";
|
||||
var lastRoles = "{\"User\":{\"Change\":2,\"ReadFullRecord\":1},\"UserOptions\":{\"Change\":2,\"ReadFullRecord\":1},\"Widget\":{\"Change\":34,\"ReadFullRecord\":17},\"ServerState\":{\"Change\":16384,\"ReadFullRecord\":131071},\"License\":{\"Change\":16386,\"ReadFullRecord\":8193},\"LogFile\":{\"Change\":0,\"ReadFullRecord\":24576},\"JobOperations\":{\"Change\":16384,\"ReadFullRecord\":8195},\"AyaNova7Import\":{\"Change\":16384,\"ReadFullRecord\":0},\"Metrics\":{\"Change\":0,\"ReadFullRecord\":24576},\"Locale\":{\"Change\":16386,\"ReadFullRecord\":131071},\"DataListSortFilter\":{\"Change\":2,\"ReadFullRecord\":131071},\"FormCustom\":{\"Change\":2,\"ReadFullRecord\":131071}}";
|
||||
var lastRoles = "{\"User\":{\"Change\":2,\"ReadFullRecord\":1},\"UserOptions\":{\"Change\":2,\"ReadFullRecord\":1},\"Widget\":{\"Change\":34,\"ReadFullRecord\":17},\"ServerState\":{\"Change\":16384,\"ReadFullRecord\":131071},\"License\":{\"Change\":16386,\"ReadFullRecord\":8193},\"LogFile\":{\"Change\":0,\"ReadFullRecord\":24576},\"JobOperations\":{\"Change\":16384,\"ReadFullRecord\":8195},\"AyaNova7Import\":{\"Change\":16384,\"ReadFullRecord\":0},\"Metrics\":{\"Change\":0,\"ReadFullRecord\":24576},\"Locale\":{\"Change\":16386,\"ReadFullRecord\":131071},\"DataListView\":{\"Change\":2,\"ReadFullRecord\":131071},\"FormCustom\":{\"Change\":2,\"ReadFullRecord\":131071}}";
|
||||
Dictionary<AyaType, BizRoleSet> lastRolesDeserialized = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<AyaType, BizRoleSet>>(lastRoles);
|
||||
if (lastRolesDeserialized.Count != roles.Count)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace AyaNova.Biz
|
||||
//EXISTS
|
||||
internal async Task<bool> ExistsAsync(long id)
|
||||
{
|
||||
return await ct.DataListSortFilter.AnyAsync(e => e.Id == id);
|
||||
return await ct.DataListView.AnyAsync(e => e.Id == id);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace AyaNova.Biz
|
||||
outObj.UserId = UserId;
|
||||
|
||||
|
||||
await ct.DataListSortFilter.AddAsync(outObj);
|
||||
await ct.DataListView.AddAsync(outObj);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//Handle child and associated items:
|
||||
@@ -84,7 +84,7 @@ namespace AyaNova.Biz
|
||||
internal async Task<DataListView> GetAsync(long fetchId, bool logTheGetEvent = true)
|
||||
{
|
||||
//This is simple so nothing more here, but often will be copying to a different output object or some other ops
|
||||
var ret = await ct.DataListSortFilter.SingleOrDefaultAsync(m => m.Id == fetchId && (m.Public == true || m.UserId == UserId));
|
||||
var ret = await ct.DataListView.SingleOrDefaultAsync(m => m.Id == fetchId && (m.Public == true || m.UserId == UserId));
|
||||
if (logTheGetEvent && ret != null)
|
||||
{
|
||||
//Log
|
||||
@@ -102,7 +102,7 @@ namespace AyaNova.Biz
|
||||
List<NameIdItem> items = new List<NameIdItem>();
|
||||
if (!string.IsNullOrWhiteSpace(listKey))
|
||||
{
|
||||
items = await ct.DataListSortFilter
|
||||
items = await ct.DataListView
|
||||
.AsNoTracking()
|
||||
.Where(m => m.ListKey == listKey && (m.Public == true || m.UserId == UserId))
|
||||
.OrderBy(m => m.Name)
|
||||
@@ -164,7 +164,7 @@ namespace AyaNova.Biz
|
||||
|
||||
if (HasErrors)
|
||||
return false;
|
||||
ct.DataListSortFilter.Remove(dbObj);
|
||||
ct.DataListView.Remove(dbObj);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//Delete sibling objects
|
||||
@@ -209,7 +209,7 @@ namespace AyaNova.Biz
|
||||
if (!PropertyHasErrors("Name"))
|
||||
{
|
||||
//Use Any command is efficient way to check existance, it doesn't return the record, just a true or false
|
||||
if (await ct.DataListSortFilter.AnyAsync(m => m.Name == inObj.Name && m.Id != inObj.Id))
|
||||
if (await ct.DataListView.AnyAsync(m => m.Name == inObj.Name && m.Id != inObj.Id))
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_UNIQUE, "Name");
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace AyaNova.Models
|
||||
public virtual DbSet<OpsJobLog> OpsJobLog { get; set; }
|
||||
public virtual DbSet<Locale> Locale { get; set; }
|
||||
public virtual DbSet<LocaleItem> LocaleItem { get; set; }
|
||||
public virtual DbSet<DataListView> DataListSortFilter { get; set; }
|
||||
public virtual DbSet<DataListView> DataListView { get; set; }
|
||||
public virtual DbSet<Tag> Tag { get; set; }
|
||||
public virtual DbSet<FormCustom> FormCustom { get; set; }
|
||||
|
||||
|
||||
@@ -1612,5 +1612,5 @@
|
||||
"NotificationSettings": "Benachrichtigungseinstellungen",
|
||||
"Review": "Überprüfung",
|
||||
"UserSettings": "Benutzereinstellungen",
|
||||
"DataListSortFilter": "Sortieren und Filtern"
|
||||
"DataListView": "Datenlistenansicht"
|
||||
}
|
||||
|
||||
@@ -1611,7 +1611,7 @@
|
||||
"NotificationSettings": "Notification settings",
|
||||
"Review": "Review",
|
||||
"UserSettings": "User settings",
|
||||
"DataListSortFilter": "Sort & filter"
|
||||
"DataListView": "Data list view"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1612,7 +1612,7 @@
|
||||
"NotificationSettings": "Configuración de notificaciones",
|
||||
"Review": "Revisión",
|
||||
"UserSettings": "Configuración de usuario",
|
||||
"DataListSortFilter": "Ordenar y filtrar"
|
||||
"DataListView": "Vista de lista de datos"
|
||||
|
||||
|
||||
}
|
||||
@@ -1611,7 +1611,7 @@
|
||||
"NotificationSettings": "Paramètres de notification",
|
||||
"Review": "Évaluation",
|
||||
"UserSettings": "Paramètres utilisateur",
|
||||
"DataListSortFilter": "Trier et filtrer"
|
||||
"DataListView": "Affichage de la liste des données"
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user