This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user