diff --git a/BMA.EHR.Application/Repositories/UserProfileRepository.cs b/BMA.EHR.Application/Repositories/UserProfileRepository.cs index 7b859ef7..db36e5c9 100644 --- a/BMA.EHR.Application/Repositories/UserProfileRepository.cs +++ b/BMA.EHR.Application/Repositories/UserProfileRepository.cs @@ -304,6 +304,38 @@ namespace BMA.EHR.Application.Repositories } } + public async Task> GetProfileWithKeycloakAllOfficerRetireFilter(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement) + { + try + { + var apiPath = $"{_configuration["API"]}/org/dotnet/keycloak-all-officer"; + var apiKey = _configuration["API_KEY"]; + var body = new + { + node = node, + nodeId = nodeId, + isAll = isAll, + isRetirement = isRetirement, + }; + + var profiles = new List(); + + var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey); + if (apiResult != null) + { + var raw = JsonConvert.DeserializeObject(apiResult); + if (raw != null) + return raw.Result; + } + + return null; + } + catch + { + throw; + } + } + public async Task> GetProfileWithKeycloakAllEmployee(string? accessToken, int? node, string? nodeId, bool isAll) { try diff --git a/BMA.EHR.Leave/DTOs/Reports/GetLeaveDetailByNodeReportDto.cs b/BMA.EHR.Leave/DTOs/Reports/GetLeaveDetailByNodeReportDto.cs index 37275320..6d00f073 100644 --- a/BMA.EHR.Leave/DTOs/Reports/GetLeaveDetailByNodeReportDto.cs +++ b/BMA.EHR.Leave/DTOs/Reports/GetLeaveDetailByNodeReportDto.cs @@ -7,5 +7,6 @@ namespace BMA.EHR.Leave.Service.DTOs.Reports public string? Type { get; set; } = string.Empty; public int node { get; set; } public string nodeId { get; set; } + public bool? isRetirement { get; set; } = false; } } \ No newline at end of file