เปลี่ยนเส้น api call รายชื่อ
Some checks failed
release-dev / release-dev (push) Failing after 11s

This commit is contained in:
Bright 2025-03-12 13:17:09 +07:00
parent 2a6bef472b
commit 6c84542e94
2 changed files with 133 additions and 4 deletions

View file

@ -780,11 +780,13 @@ namespace BMA.EHR.Leave.Service.Controllers
var profile = new List<GetProfileByKeycloakIdRootDto>();
if (type.Trim().ToUpper() == "OFFICER")
{
profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficerAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
//profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficerAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllOfficerAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
}
else
{
profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployeeAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
//profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployeeAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllEmployeeAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.revisionId);
}
// get leave day
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate);
@ -1160,11 +1162,13 @@ namespace BMA.EHR.Leave.Service.Controllers
var profile = new List<GetProfileByKeycloakIdRootDto>();
if (type.Trim().ToUpper() == "OFFICER")
{
profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
//profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllOfficer(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
}
else
{
profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
//profile = await _userProfileRepository.GetProfileWithKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
profile = await _userProfileRepository.GetProfileWithNoneValidateKeycloakAllEmployee(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD");
}
var date = req.StartDate.Date;