diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs
index de2c7ab2..9b32b1eb 100644
--- a/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs
+++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs
@@ -59,7 +59,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
/// ไม่ได้ Login เข้าระบบ
/// เมื่อเกิดข้อผิดพลาดในการทำงาน
[HttpGet()]
- public async Task> GetDisciplineSuspend(DateTime? startDate, DateTime? endDate, int page = 1, int pageSize = 25, string keyword = "", string profileType = "", string? sortBy = "", bool? descending = false)
+ public async Task> GetDisciplineSuspend(DateTime? startDate, DateTime? endDate, int page = 1, int pageSize = 25, string keyword = "", string profileType = "", string? sortBy = "", bool? descending = false, string? status="")
{
var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_SUSPENDED");
var jsonData = JsonConvert.DeserializeObject(getPermission);
@@ -78,7 +78,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
) :
true
)
- &&
+ &&
(
(x.CitizenId != null && x.CitizenId.Contains(keyword)) ||
((x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) ||
@@ -94,6 +94,10 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
(profileType.ToUpper() == "OFFICER" && x.profileType == "OFFICER") ||
(profileType.ToUpper() == "EMPLOYEE" && x.profileType == "EMPLOYEE")
)
+ &&
+ (
+ !string.IsNullOrEmpty(status) ? x.Status!.Trim().ToUpper() == status : true
+ )
select x).ToList();
var query = data_search
.Select(x => new