This commit is contained in:
Mike Casas 2020-06-18 07:35:40 -04:00
parent ab8a1e7324
commit ee5553ad8a
3 changed files with 5 additions and 2 deletions

View File

@ -65,7 +65,8 @@
notification.ParentId = null; notification.ParentId = null;
notification.CreatedOn = DateTime.UtcNow; notification.CreatedOn = DateTime.UtcNow;
notification.IsDelivered = false; notification.IsDelivered = false;
notification.DeliveredOn = null; notification.DeliveredOn = null;
notification.SendOn = DateTime.UtcNow;
notification = await NotificationService.AddNotificationAsync(notification); notification = await NotificationService.AddNotificationAsync(notification);
await logger.LogInformation("Notification Created {Notification}", notification); await logger.LogInformation("Notification Created {Notification}", notification);
NavigationManager.NavigateTo(NavigateUrl()); NavigationManager.NavigateTo(NavigateUrl());

View File

@ -191,7 +191,8 @@
notification.ParentId = notificationid; notification.ParentId = notificationid;
notification.CreatedOn = DateTime.UtcNow; notification.CreatedOn = DateTime.UtcNow;
notification.IsDelivered = false; notification.IsDelivered = false;
notification.DeliveredOn = null; notification.DeliveredOn = null;
notification.SendOn = DateTime.UtcNow;
notification = await NotificationService.AddNotificationAsync(notification); notification = await NotificationService.AddNotificationAsync(notification);
await logger.LogInformation("Notification Created {Notification}", notification); await logger.LogInformation("Notification Created {Notification}", notification);
NavigationManager.NavigateTo(NavigateUrl()); NavigationManager.NavigateTo(NavigateUrl());

View File

@ -21,6 +21,7 @@ namespace Oqtane.Repository
return _db.Notification return _db.Notification
.Where(item => item.SiteId == siteId) .Where(item => item.SiteId == siteId)
.Where(item => item.IsDelivered == false) .Where(item => item.IsDelivered == false)
.Where(item => item.SendOn < System.DateTime.UtcNow)
.ToList(); .ToList();
} }