|
@@ -53,14 +53,21 @@ namespace Comal.Stores
|
|
|
}
|
|
|
if (emps.Rows.Count == 0)
|
|
|
{
|
|
|
- Notification notification = new Notification();
|
|
|
- notification.Employee.ID = entity.EmployeeLink.ID;
|
|
|
- notification.Sender.ID = entity.ManagerLink.ID;
|
|
|
- notification.Title = Subject;
|
|
|
- notification.EntityType = typeof(Kanban).EntityName();
|
|
|
- notification.EntityID = entity.ID;
|
|
|
- notification.Description = BuildDescription(entity);
|
|
|
- notifications.Add(notification);
|
|
|
+ var userID = Provider.Query(
|
|
|
+ new Filter<Employee>(x => x.ID).IsEqualTo(entity.EmployeeLink.ID),
|
|
|
+ new Columns<Employee>(x => x.UserLink.ID)
|
|
|
+ ).Rows.FirstOrDefault()?.Get<Employee, Guid>(x => x.UserLink.ID);
|
|
|
+ if(userID != UserGuid)
|
|
|
+ {
|
|
|
+ Notification notification = new Notification();
|
|
|
+ notification.Employee.ID = entity.EmployeeLink.ID;
|
|
|
+ notification.Sender.ID = entity.ManagerLink.ID;
|
|
|
+ notification.Title = Subject;
|
|
|
+ notification.EntityType = typeof(Kanban).EntityName();
|
|
|
+ notification.EntityID = entity.ID;
|
|
|
+ notification.Description = BuildDescription(entity);
|
|
|
+ notifications.Add(notification);
|
|
|
+ }
|
|
|
}
|
|
|
if (notifications.Any())
|
|
|
FindSubStore<Notification>().Save(notifications, "");
|