Fix รายการให้ออกส่ง status เป็นว่างรายการไม่แสดงทั้งหมด #1654
Some checks failed
release-dev / release-dev (push) Failing after 10s

This commit is contained in:
Bright 2025-07-21 10:33:42 +07:00
parent aef2d3381a
commit 3384c520d7

View file

@ -75,7 +75,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("{type}")]
public async Task<ActionResult<ResponseObject>> GetListByAdmin(string type, string? status = "WAITTING")
public async Task<ActionResult<ResponseObject>> GetListByAdmin(string type, string? status = "")
{
string role = "";
if (type.Trim().ToUpper() == "OFFICER")
@ -173,8 +173,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
p.child4DnaOldId,
})
.ToListAsync();
//if (status != null && status.Trim().ToUpper() != "WAITTING")
if (status != null)
if (!string.IsNullOrEmpty(status))
retirementOuts = retirementOuts.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList();
if (role == "OWNER")