From 2b3e8ea619971fc9d565fa007b47bbe2fd909053 Mon Sep 17 00:00:00 2001 From: Syed Mustafa Ahmed Naqvi Date: Thu, 27 Aug 2026 09:43:35 +0500 Subject: [PATCH] fix(hrms): align employee service with UIND schema Corrects HRMS field names for employees, departments, and location sites. --- .../Services/HrmsEmployeeService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HikvisionAttendanceManager.App/Services/HrmsEmployeeService.cs b/src/HikvisionAttendanceManager.App/Services/HrmsEmployeeService.cs index fe40e92..9ceb7a4 100644 --- a/src/HikvisionAttendanceManager.App/Services/HrmsEmployeeService.cs +++ b/src/HikvisionAttendanceManager.App/Services/HrmsEmployeeService.cs @@ -77,6 +77,10 @@ public sealed class HrmsEmployeeService }, cancellationToken); } + public async Task> GetActiveEmployeesBySiteAsync(long siteId, CancellationToken cancellationToken) => + await QueryEmployeesAsync(EmployeeQuery + " WHERE e.is_active = 1 AND e.location_site_id = @siteId ORDER BY employee_display_name", + command => command.Parameters.AddWithValue("@siteId", siteId), cancellationToken); + public async Task> SearchEmployeesAsync(string query, long? siteId, CancellationToken cancellationToken) { if (string.IsNullOrWhiteSpace(query)) return [];