This commit is contained in:
@@ -1085,24 +1085,22 @@ namespace AyaNova.Biz
|
||||
//not for inactive users
|
||||
if (!await UserBiz.UserIsActive(sub.UserId)) continue;
|
||||
|
||||
//Tag match? (will be true if no sub tags so always safe to call this)
|
||||
if (NotifyEventHelper.ObjectHasAllSubscriptionTags(proposedObj.Tags, sub.Tags))
|
||||
{
|
||||
//No tag match for this one
|
||||
|
||||
NotifyEvent n = new NotifyEvent()
|
||||
{
|
||||
EventType = NotifyEventType.CustomerServiceImminent,
|
||||
UserId = sub.UserId,
|
||||
AyaType = proposedObj.AyaType,
|
||||
ObjectId = proposedObj.Id,
|
||||
NotifySubscriptionId = sub.Id,
|
||||
Name = oProposed.Serial.ToString(),
|
||||
EventDate = (DateTime)oProposed.CompleteByDate
|
||||
};
|
||||
await ct.NotifyEvent.AddAsync(n);
|
||||
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
NotifyEvent n = new NotifyEvent()
|
||||
{
|
||||
EventType = NotifyEventType.CustomerServiceImminent,
|
||||
UserId = sub.UserId,
|
||||
AyaType = proposedObj.AyaType,
|
||||
ObjectId = proposedObj.Id,
|
||||
NotifySubscriptionId = sub.Id,
|
||||
Name = oProposed.Serial.ToString(),
|
||||
EventDate = (DateTime)oProposed.CompleteByDate
|
||||
};
|
||||
await ct.NotifyEvent.AddAsync(n);
|
||||
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||
await ct.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
}//CustomerServiceImminent
|
||||
@@ -1125,23 +1123,21 @@ namespace AyaNova.Biz
|
||||
//not for inactive users
|
||||
if (!await UserBiz.UserIsActive(sub.UserId)) continue;
|
||||
|
||||
//Tag match? (will be true if no sub tags so always safe to call this)
|
||||
if (NotifyEventHelper.ObjectHasAllSubscriptionTags(proposedObj.Tags, sub.Tags))
|
||||
//No tag match for this one
|
||||
NotifyEvent n = new NotifyEvent()
|
||||
{
|
||||
NotifyEvent n = new NotifyEvent()
|
||||
{
|
||||
EventType = NotifyEventType.CustomerServiceImminent,
|
||||
UserId = sub.UserId,
|
||||
AyaType = proposedObj.AyaType,
|
||||
ObjectId = proposedObj.Id,
|
||||
NotifySubscriptionId = sub.Id,
|
||||
Name = oProposed.Serial.ToString(),
|
||||
EventDate = (DateTime)oProposed.CompleteByDate
|
||||
};
|
||||
await ct.NotifyEvent.AddAsync(n);
|
||||
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||
await ct.SaveChangesAsync();
|
||||
}
|
||||
EventType = NotifyEventType.CustomerServiceImminent,
|
||||
UserId = sub.UserId,
|
||||
AyaType = proposedObj.AyaType,
|
||||
ObjectId = proposedObj.Id,
|
||||
NotifySubscriptionId = sub.Id,
|
||||
Name = oProposed.Serial.ToString(),
|
||||
EventDate = (DateTime)oProposed.CompleteByDate
|
||||
};
|
||||
await ct.NotifyEvent.AddAsync(n);
|
||||
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user