Implemented an API endpoint that allows the system to record attendance entries (e.g., check-in and check-out) for a specific employee. This helps track employee working hours, presence, and status. #37

Merged
vikas.nale merged 3 commits from Ashutosh_Feature#183_Get_AttendanceLogs_By_EmployeeId into main 2025-05-06 12:12:26 +00:00
Showing only changes of commit b059a733bb - Show all commits

View File

@ -164,6 +164,7 @@ namespace MarcoBMS.Services.Controllers
List<ProjectAllocation> projectteam = await _projectsHelper.GetTeamByProject(TenantId, projectId, true);
var jobRole = await _context.JobRoles.ToListAsync();
foreach (Attendance? attendance in lstAttendance)
{
var result1 = new EmployeeAttendanceVM()
@ -178,8 +179,18 @@ namespace MarcoBMS.Services.Controllers
{
result1.EmployeeAvatar = null;
result1.EmployeeId = teamMember.EmployeeId;
result1.FirstName = teamMember.Employee != null ? teamMember.Employee.FirstName : null;
result1.LastName = teamMember.Employee != null ? teamMember.Employee.LastName : null;
if (teamMember.Employee != null)
{
result1.FirstName = teamMember.Employee.FirstName;
result1.LastName = teamMember.Employee.LastName;
result1.JobRoleName = teamMember.Employee.JobRole != null ? teamMember.Employee.JobRole.Name : null;
}
else
{
result1.FirstName = null;
result1.LastName = null;
result1.JobRoleName = null;
}
result.Add(result1);
}