This commit is contained in:
@@ -1315,7 +1315,7 @@ namespace AyaNova.Biz
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region Customer centric notifications
|
#region Customer centric notifications USER notifications
|
||||||
if (ayaEvent == AyaEvent.Created && oProposed.ServiceDate != null && oProposed.ServiceDate > DateTime.UtcNow)
|
if (ayaEvent == AyaEvent.Created && oProposed.ServiceDate != null && oProposed.ServiceDate > DateTime.UtcNow)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1442,10 +1442,8 @@ namespace AyaNova.Biz
|
|||||||
}//CustomerServiceImminent "Service Reminder"
|
}//CustomerServiceImminent "Service Reminder"
|
||||||
|
|
||||||
//# WorkorderCreatedForCustomer - Customer / headoffice notification
|
//# WorkorderCreatedForCustomer - Customer / headoffice notification
|
||||||
if (oProposed.CustomerId != 0 && (ayaEvent == AyaEvent.Created
|
if (oProposed.CustomerId != 0 && (ayaEvent == AyaEvent.Created || (ayaEvent == AyaEvent.Modified && oCurrent.CustomerId != oProposed.CustomerId)))
|
||||||
|| (ayaEvent == AyaEvent.Modified && oCurrent.CustomerId != oProposed.CustomerId)))
|
|
||||||
{
|
{
|
||||||
|
|
||||||
//look for potential subscribers
|
//look for potential subscribers
|
||||||
var subs = await ct.NotifySubscription.AsNoTracking().Where(z => z.EventType == NotifyEventType.WorkorderCreatedForCustomer).ToListAsync();
|
var subs = await ct.NotifySubscription.AsNoTracking().Where(z => z.EventType == NotifyEventType.WorkorderCreatedForCustomer).ToListAsync();
|
||||||
foreach (var sub in subs)
|
foreach (var sub in subs)
|
||||||
@@ -2058,7 +2056,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
EventType = NotifyEventType.WorkorderCompleted,
|
EventType = NotifyEventType.WorkorderCompleted,
|
||||||
CustomerId = WorkorderInfo.CustomerId,
|
CustomerId = WorkorderInfo.CustomerId,
|
||||||
AyaType = AyaType.Quote,
|
AyaType = AyaType.WorkOrder,
|
||||||
ObjectId = oProposed.WorkOrderId,
|
ObjectId = oProposed.WorkOrderId,
|
||||||
CustomerNotifySubscriptionId = sub.Id,
|
CustomerNotifySubscriptionId = sub.Id,
|
||||||
Name = WorkorderInfo.Serial.ToString()
|
Name = WorkorderInfo.Serial.ToString()
|
||||||
|
|||||||
Reference in New Issue
Block a user