Ashutosh_Task#513 #96
@ -562,7 +562,13 @@ namespace MarcoBMS.Services.Controllers
|
||||
Activity = attendance.Activity,
|
||||
JobRoleName = employee.JobRole.Name
|
||||
};
|
||||
await _signalR.Clients.All.SendAsync("Attendance", new { LoggedInUserId = currentEmployee.Id, ProjectId = recordAttendanceDot.ProjectID, Response = vm });
|
||||
var sendActivity = 0;
|
||||
if (recordAttendanceDot.Id == Guid.Empty)
|
||||
{
|
||||
sendActivity = 1;
|
||||
}
|
||||
var notification = new { LoggedInUserId = currentEmployee.Id, Keyword = "Attendance", Activity = sendActivity, ProjectId = attendance.ProjectID, Response = vm };
|
||||
await _signalR.Clients.All.SendAsync("NotificationEventHandler", notification);
|
||||
_logger.LogInfo("Attendance for employee {FirstName} {LastName} has been marked", employee.FirstName ?? string.Empty, employee.LastName ?? string.Empty);
|
||||
return Ok(ApiResponse<object>.SuccessResponse(vm, "Attendance marked successfully.", 200));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user