แก้ defect เรื่องการเรียงลำดับ
This commit is contained in:
parent
e21d19ea23
commit
ce476e0f6d
4 changed files with 16 additions and 1 deletions
|
|
@ -64,6 +64,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
var data = await _dbContext.Set<AdditionalCheckRequest>().AsQueryable()
|
||||
.Where(x => x.KeycloakUserId == keycloakId)
|
||||
.Where(x => (x.CheckDate.Year == year && x.CheckDate.Month == month))
|
||||
.OrderByDescending(x => x.CheckDate.Date) // add sort for fix defect
|
||||
.ToListAsync();
|
||||
|
||||
return data;
|
||||
|
|
@ -80,6 +81,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
{
|
||||
var data = await _dbContext.Set<AdditionalCheckRequest>().AsQueryable()
|
||||
.Where(x => (x.CheckDate.Year == year && x.CheckDate.Month == month))
|
||||
.OrderByDescending(x => x.CreatedAt.Date)
|
||||
.ToListAsync();
|
||||
|
||||
return data;
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
var data = await _dbContext.Set<ProcessUserTimeStamp>()
|
||||
.Where(u => u.KeycloakUserId == keycloakId)
|
||||
.Where(u => u.CheckIn.Year == year)
|
||||
.OrderBy(u => u.CheckIn)
|
||||
.OrderByDescending(u => u.CheckIn.Date)
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToListAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue