From 90eb94cee327ac194378e4dd163404384bc6b9fd Mon Sep 17 00:00:00 2001 From: harid Date: Wed, 28 Jan 2026 16:24:59 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=AD=E0=B8=87=E0=B8=84?= =?UTF-8?q?=E0=B9=89=E0=B8=99=E0=B8=AB=E0=B8=B2=E0=B8=82=E0=B9=89=E0=B8=AD?= =?UTF-8?q?=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5?= =?UTF-8?q?=E0=B8=B2=E0=B8=81=E0=B8=A3=E0=B8=93=E0=B8=B5=E0=B8=9E=E0=B8=B4?= =?UTF-8?q?=E0=B9=80=E0=B8=A8=E0=B8=A9=20#2252?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AdditionalCheckRequestRepository.cs | 13 ++++++++++++- BMA.EHR.Leave/Controllers/LeaveController.cs | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs index 12f51207..64e1e745 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/AdditionalCheckRequestRepository.cs @@ -144,7 +144,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants } } - public async Task> GetAdditionalCheckRequestsByAdminRole(int year, int month, string role, string nodeId, int? node) + public async Task> GetAdditionalCheckRequestsByAdminRole(int year, int month, string role, string nodeId, int? node, string? keyword) { try { @@ -152,6 +152,17 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants .Where(x => (x.CheckDate.Year == year && x.CheckDate.Month == month)) .OrderByDescending(x => x.CreatedAt.Date) .ToListAsync(); + + if (!string.IsNullOrEmpty(keyword)) + { + data = data.Where(x => + ( + (x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) + || x.Description.Contains(keyword) + + ).ToList(); + } + if (role == "OWNER") { node = null; diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index 809a28e3..9d7c4581 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -2805,7 +2805,7 @@ namespace BMA.EHR.Leave.Service.Controllers } //var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequests(year, month); - var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole(year, month, role, nodeId, profileAdmin?.Node); + var rawData = await _additionalCheckRequestRepository.GetAdditionalCheckRequestsByAdminRole(year, month, role, nodeId, profileAdmin?.Node, keyword); var total = rawData.Count;