This commit is contained in:
parent
b9814bd346
commit
3c1182ff26
2 changed files with 17 additions and 2 deletions
|
|
@ -271,6 +271,19 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
return data.Sum(x => x.LeaveTotal);
|
||||
}
|
||||
|
||||
//public async Task<double> GetSumApproveLeaveByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId, int year)
|
||||
//{
|
||||
// var data = await _dbContext.Set<LeaveRequest>().AsQueryable().AsNoTracking()
|
||||
// .Include(x => x.Type)
|
||||
// .Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
// .Where(x => x.Type.Id == leaveTypeId)
|
||||
// .Where(x => x.LeaveStartDate.Year == year)
|
||||
// .Where(x => x.LeaveStatus == "APPROVE")
|
||||
// .ToListAsync();
|
||||
|
||||
// return data.Sum(x => x.LeaveTotal);
|
||||
//}
|
||||
|
||||
public async Task<DateTime?> GetLeaveLastByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId)
|
||||
{
|
||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable().AsNoTracking()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue