Update LeaveRequestRepository to order leave requests by creation date instead of start date #2305
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m44s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m44s
This commit is contained in:
parent
65feb994ee
commit
869defcc7e
1 changed files with 1 additions and 1 deletions
|
|
@ -579,7 +579,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
.Where(x => x.Type.Id == leaveTypeId)
|
.Where(x => x.Type.Id == leaveTypeId)
|
||||||
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
.Where(x => x.LeaveStatus == "APPROVE" || x.LeaveStatus == "DELETING")
|
||||||
//.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE")
|
//.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE")
|
||||||
.OrderByDescending(x => x.LeaveStartDate.Date)
|
.OrderByDescending(x => x.CreatedAt)
|
||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue