Fix Leave Report
This commit is contained in:
parent
b3c752d2e6
commit
8097555951
2 changed files with 11 additions and 4 deletions
|
|
@ -35,6 +35,8 @@ namespace BMA.EHR.Application.Responses.Profiles
|
|||
|
||||
public string? PosNo { get; set; }
|
||||
|
||||
public string? PositionLevel { get; set; }
|
||||
|
||||
public string? PosNoEmployee { get; set; }
|
||||
|
||||
public string? Gender { get; set; }
|
||||
|
|
|
|||
|
|
@ -745,7 +745,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
{
|
||||
//var profile = await _userProfileRepository.SearchProfile(null, null, null);
|
||||
var profile = await _userProfileRepository.GetProfileWithKeycloak(AccessToken);
|
||||
|
||||
if (profile.Count > 0)
|
||||
{
|
||||
profile = profile.Where(p => p.IsLeave == false).ToList();
|
||||
}
|
||||
// get leave day
|
||||
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate);
|
||||
var leaveTypes = await _leaveTypeRepository.GetAllAsync();
|
||||
|
|
@ -836,8 +839,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
no = count,
|
||||
fullName = $"{p.Prefix}{p.FirstName} {p.LastName}",// _userProfileRepository.GetUserFullName(p.Keycloak ?? Guid.Empty, AccessToken),
|
||||
position = p.Position == null ? "" : p.Position,
|
||||
positionLevel = p.PosLevel == null ? "" : p.PosLevel.PosLevelName,
|
||||
posNo = p.ProfileSalary == null ? "" : p.ProfileSalary.PosNo,
|
||||
//positionLevel = p.PosLevel == null ? "" : p.PosLevel.PosLevelName,
|
||||
//posNo = p.ProfileSalary == null ? "" : p.ProfileSalary.PosNo,
|
||||
positionLevel = p.PositionLevel == null ? "" : p.PositionLevel,
|
||||
posNo = p.PosNo == null ? "" : p.PosNo,
|
||||
reason = "",
|
||||
|
||||
sickDayCount = sickDayCount,
|
||||
|
|
@ -999,7 +1004,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
{
|
||||
no = count,
|
||||
fullName = $"{p.Prefix}{p.FirstName} {p.LastName}",// _userProfileRepository.GetUserFullName(p.Keycloak ?? Guid.Empty, AccessToken),
|
||||
posNo = p.PosNoEmployee ?? "",
|
||||
posNo = p.PosNo ?? "",
|
||||
reason = "",
|
||||
|
||||
sickDay = sickDayCount,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue