This commit is contained in:
2020-07-20 23:19:54 +00:00
parent 243d71612d
commit 840c71e953
2 changed files with 36 additions and 7 deletions

2
.vscode/launch.json vendored
View File

@@ -50,7 +50,7 @@
"AYANOVA_USE_URLS": "http://*:7575;",
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
"AYANOVA_SERVER_TEST_MODE":"false",
"AYANOVA_SERVER_TEST_MODE":"true",
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL":"small",
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET":"-7",
"AYANOVA_BACKUP_PG_DUMP_PATH":"C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\"

View File

@@ -152,7 +152,8 @@ namespace AyaNova.Biz
ObjectId = newObject.Id,
NotifySubscriptionId = sub.Id,
//TODO: IdValue=((WorkOrder)newObject).WorkorderStatusId
EventDate = DateTime.UtcNow
EventDate = DateTime.UtcNow,
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
@@ -218,7 +219,8 @@ namespace AyaNova.Biz
AyaType = newObject.AyaType,
ObjectId = newObject.Id,
NotifySubscriptionId = sub.Id,
EventDate = DateTime.UtcNow
EventDate = DateTime.UtcNow,
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
@@ -235,7 +237,15 @@ namespace AyaNova.Biz
{
if (TagsMatch(newObject.Tags, sub.Tags))
{
NotifyEvent n = new NotifyEvent() { EventType = NotifyEventType.ObjectCreated, UserId = sub.UserId, AyaType = newObject.AyaType, ObjectId = newObject.Id, NotifySubscriptionId = sub.Id };
NotifyEvent n = new NotifyEvent()
{
EventType = NotifyEventType.ObjectCreated,
UserId = sub.UserId,
AyaType = newObject.AyaType,
ObjectId = newObject.Id,
NotifySubscriptionId = sub.Id,
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
SaveContext = true;
@@ -273,7 +283,10 @@ namespace AyaNova.Biz
// ObjectId = newObject.Id,
// NotifySubscriptionId = sub.Id,
// //TODO: IdValue=((WorkOrder)newObject).WorkorderStatusId
// EventDate = DateTime.UtcNow
// EventDate = DateTime.UtcNow,
//Name=newObject.Name
//,
// Name=newObject.Name
// };
// await ct.NotifyEvent.AddAsync(n);
// log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
@@ -338,7 +351,15 @@ namespace AyaNova.Biz
{
if (TagsMatch(newObject.Tags, sub.Tags))
{
NotifyEvent n = new NotifyEvent() { EventType = NotifyEventType.ObjectModified, UserId = sub.UserId, AyaType = newObject.AyaType, ObjectId = newObject.Id, NotifySubscriptionId = sub.Id };
NotifyEvent n = new NotifyEvent()
{
EventType = NotifyEventType.ObjectModified,
UserId = sub.UserId,
AyaType = newObject.AyaType,
ObjectId = newObject.Id,
NotifySubscriptionId = sub.Id,
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
SaveContext = true;
@@ -373,7 +394,15 @@ namespace AyaNova.Biz
if (TagsMatch(newObject.Tags, sub.Tags))
{
//TODO: On deliver should point to history event log record or take from there and insert into delivery message?
NotifyEvent n = new NotifyEvent() { EventType = NotifyEventType.ObjectDeleted, UserId = sub.UserId, AyaType = newObject.AyaType, ObjectId = newObject.Id, NotifySubscriptionId = sub.Id, Message = newObject.Name };
NotifyEvent n = new NotifyEvent()
{
EventType = NotifyEventType.ObjectDeleted,
UserId = sub.UserId,
AyaType = newObject.AyaType,
ObjectId = newObject.Id,
NotifySubscriptionId = sub.Id,
Message = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
SaveContext = true;