This commit is contained in:
parent
7ddc1debfc
commit
4494939c5f
2 changed files with 8 additions and 1 deletions
|
|
@ -280,7 +280,12 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
.Where(x => x.KeycloakUserId == keycloakUserId);
|
.Where(x => x.KeycloakUserId == keycloakUserId);
|
||||||
|
|
||||||
if (year != 0)
|
if (year != 0)
|
||||||
rawData = rawData.Where(x => x.LeaveStartDate.Year == year);
|
{
|
||||||
|
var startFiscalDate = new DateTime(year - 1, 10, 1);
|
||||||
|
var endFiscalDate = new DateTime(year, 9, 30);
|
||||||
|
rawData = rawData.Where(x => x.LeaveStartDate.Date >= startFiscalDate && x.LeaveStartDate.Date <= endFiscalDate);
|
||||||
|
}
|
||||||
|
//rawData = rawData.Where(x => x.LeaveStartDate.Year == year);
|
||||||
|
|
||||||
if (type != Guid.Empty)
|
if (type != Guid.Empty)
|
||||||
rawData = rawData.Where(x => x.Type.Id == type);
|
rawData = rawData.Where(x => x.Type.Id == type);
|
||||||
|
|
|
||||||
|
|
@ -1349,6 +1349,8 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
// return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
// return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var rawData =
|
var rawData =
|
||||||
await _leaveRequestRepository.GetLeaveRequestByUserIdAsync(userId, req.Year, req.Type, req.Status);
|
await _leaveRequestRepository.GetLeaveRequestByUserIdAsync(userId, req.Year, req.Type, req.Status);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue