This commit is contained in:
2020-12-23 15:42:39 +00:00
parent c0a90fffb0
commit 22ac0d9189
3 changed files with 69 additions and 27 deletions

View File

@@ -465,7 +465,7 @@ namespace AyaNova.Biz
////////////////////////////////////////////////////////////////////////////////////////////////
// NOTIFICATION PROCESSING
//
public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj=null)
public async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel proposedObj, ICoreBizObjectModel currentObj = null)
{
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<ReviewBiz>();
if (ServerBootConfig.SEEDING) return;
@@ -501,6 +501,8 @@ namespace AyaNova.Biz
}
{
var eventNameTranslated = await TranslationBiz.GetTranslationForUserStaticAsync("ReviewOverDue", r.UserId);
NotifyEvent n = new NotifyEvent()
{
EventType = NotifyEventType.GeneralNotification,
@@ -508,7 +510,7 @@ namespace AyaNova.Biz
ObjectId = proposedObj.Id,
AyaType = AyaType.Review,
NotifySubscriptionId = userNotifySub.Id,
Name = "LT:ReviewOverDue - " + proposedObj.Name,
Name = $"{eventNameTranslated} - {proposedObj.Name}",
EventDate = r.DueDate
};
await ct.NotifyEvent.AddAsync(n);
@@ -517,6 +519,7 @@ namespace AyaNova.Biz
if (supervisorNotifySub != null)
{
var eventNameTranslated = await TranslationBiz.GetTranslationForUserStaticAsync("ReviewOverDue", r.AssignedByUserId);
NotifyEvent n = new NotifyEvent()
{
EventType = NotifyEventType.GeneralNotification,
@@ -524,7 +527,7 @@ namespace AyaNova.Biz
ObjectId = proposedObj.Id,
AyaType = AyaType.Review,
NotifySubscriptionId = supervisorNotifySub.Id,
Name = "LT:ReviewOverDue - " + proposedObj.Name,
Name = $"{eventNameTranslated} - {proposedObj.Name}",
EventDate = r.DueDate
};
await ct.NotifyEvent.AddAsync(n);