add parent

This commit is contained in:
kittapath 2025-10-07 11:13:28 +07:00
parent ddf899ce5d
commit 9e8fe1b30a
22 changed files with 289 additions and 122 deletions

View file

@ -90,7 +90,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
.Where(u => u.KeycloakUserId == keycloakId)
.Where(u => u.CheckIn.Year == year)
.OrderBy(u => u.CheckIn)
.ToListAsync();
return data;
@ -101,7 +101,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
var data = await _dbContext.Set<UserTimeStamp>()
.Where(u => u.CheckIn.Date >= startDate.Date && u.CheckIn.Date <= endDate.Date)
.OrderBy(u => u.CheckIn)
.ToListAsync();
return data;
@ -130,6 +130,12 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
.Where(x => x.RootDnaId == Guid.Parse(nodeId!))
.ToList();
}
else if (role == "PARENT")
{
data = data
.Where(x => x.Child1DnaId == Guid.Parse(nodeId!))
.ToList();
}
else if (role == "NORMAL")
{
data = data