This commit is contained in:
2021-06-10 19:23:55 +00:00
parent 49eeaba5f1
commit 430b6cd131

View File

@@ -1076,7 +1076,7 @@ namespace AyaNova.Biz
#region CustomerServiceImminent
if (ayaEvent == AyaEvent.Created && oProposed.ServiceDate != null)
if (ayaEvent == AyaEvent.Created && oProposed.ServiceDate != null && oProposed.ServiceDate > DateTime.UtcNow)
{
var subs = await ct.NotifySubscription.AsNoTracking().Where(z => z.EventType == NotifyEventType.CustomerServiceImminent).ToListAsync();
@@ -1114,7 +1114,7 @@ namespace AyaNova.Biz
await NotifyEventHelper.ClearPriorEventsForObject(ct, proposedObj.AyaType, proposedObj.Id, NotifyEventType.CustomerServiceImminent);
//new has date?
if (oProposed.ServiceDate != null)
if (oProposed.ServiceDate != null && oProposed.ServiceDate > DateTime.UtcNow)
{
var subs = await ct.NotifySubscription.AsNoTracking().Where(z => z.EventType == NotifyEventType.CustomerServiceImminent).ToListAsync();