Cheange the message sending when manageing project infrastructure
This commit is contained in:
parent
303f326773
commit
4164c7d761
@ -620,7 +620,7 @@ namespace MarcoBMS.Services.Controllers
|
|||||||
_context.WorkItems.Update(workItem);
|
_context.WorkItems.Update(workItem);
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
responseMessage = "Task Updated Successfully";
|
responseMessage = "Task Updated Successfully";
|
||||||
message = $"Task Updated by {LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}";
|
message = $"Task Updated in Building: {building.Name}, on Floor: {workArea.Floor?.FloorName}, in Area: {workArea.AreaName} by {LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -628,7 +628,7 @@ namespace MarcoBMS.Services.Controllers
|
|||||||
_context.WorkItems.Add(workItem);
|
_context.WorkItems.Add(workItem);
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
responseMessage = "Task Added Successfully";
|
responseMessage = "Task Added Successfully";
|
||||||
message = $"Task Added by {LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}";
|
message = $"Task Added in Building: {building.Name}, on Floor: {workArea.Floor?.FloorName}, in Area: {workArea.AreaName} by {LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}";
|
||||||
}
|
}
|
||||||
var result = new WorkItemVM
|
var result = new WorkItemVM
|
||||||
{
|
{
|
||||||
@ -675,7 +675,7 @@ namespace MarcoBMS.Services.Controllers
|
|||||||
|
|
||||||
projectIds.Add(floor?.Building?.ProjectId ?? Guid.Empty);
|
projectIds.Add(floor?.Building?.ProjectId ?? Guid.Empty);
|
||||||
|
|
||||||
var notification = new { LoggedInUserId = LoggedInEmployee.Id, Keyword = "Infra", ProjectIds = projectIds, Message = $"Task Deleted by {LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}" };
|
var notification = new { LoggedInUserId = LoggedInEmployee.Id, Keyword = "Infra", ProjectIds = projectIds, Message = $"Task Deleted in Building: {floor?.Building?.Name}, on Floor: {floor?.FloorName}, in Area: {task.WorkArea?.AreaName} by {LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}" };
|
||||||
await _signalR.Clients.All.SendAsync("NotificationEventHandler", notification);
|
await _signalR.Clients.All.SendAsync("NotificationEventHandler", notification);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -766,6 +766,7 @@ namespace MarcoBMS.Services.Controllers
|
|||||||
}
|
}
|
||||||
Building? building = await _context.Buildings.FirstOrDefaultAsync(b => b.Id == floor.BuildingId);
|
Building? building = await _context.Buildings.FirstOrDefaultAsync(b => b.Id == floor.BuildingId);
|
||||||
projectIds.Add(building?.ProjectId ?? Guid.Empty);
|
projectIds.Add(building?.ProjectId ?? Guid.Empty);
|
||||||
|
message = $"{message} in Building: {building?.Name}";
|
||||||
}
|
}
|
||||||
if (item.WorkArea != null)
|
if (item.WorkArea != null)
|
||||||
{
|
{
|
||||||
@ -792,6 +793,7 @@ namespace MarcoBMS.Services.Controllers
|
|||||||
}
|
}
|
||||||
Floor? floor = await _context.Floor.Include(f => f.Building).FirstOrDefaultAsync(f => f.Id == workArea.FloorId);
|
Floor? floor = await _context.Floor.Include(f => f.Building).FirstOrDefaultAsync(f => f.Id == workArea.FloorId);
|
||||||
projectIds.Add(floor?.Building?.ProjectId ?? Guid.Empty);
|
projectIds.Add(floor?.Building?.ProjectId ?? Guid.Empty);
|
||||||
|
message = $"{message} in Building: {floor?.Building?.Name}, on Floor: {floor?.FloorName}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message = $"{message} by {LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}";
|
message = $"{message} by {LoggedInEmployee.FirstName} {LoggedInEmployee.LastName}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user