fix api defect

This commit is contained in:
Suphonchai Phoonsawat 2023-11-15 15:38:39 +07:00
parent 8d3c646151
commit 1a29f8151d
15 changed files with 78 additions and 37 deletions

View file

@ -93,7 +93,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
public async Task<List<UserTimeStamp>> GetTimeStampHistoryForAdminAsync(DateTime startDate,DateTime endDate, int page = 1, int pageSize = 10, string keyword = "")
{
var data = await _dbContext.Set<UserTimeStamp>()
.Where(u => u.CheckIn >= startDate && u.CheckIn <= endDate)
.Where(u => u.CheckIn.Date >= startDate.Date && u.CheckIn.Date <= endDate.Date)
.OrderBy(u => u.CheckIn)
.Skip((page - 1) * pageSize)
.Take(pageSize)