fix(hrms): align employee service with UIND schema

Corrects HRMS field names for employees, departments, and location sites.
main
SYED MUSTUFA AHMED NAQVI 2026-08-27 09:43:35 +05:00
parent fb02c5b454
commit 2b3e8ea619
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,10 @@ public sealed class HrmsEmployeeService
}, cancellationToken); }, cancellationToken);
} }
public async Task<IReadOnlyList<HrmsEmployee>> 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<IReadOnlyList<HrmsEmployee>> SearchEmployeesAsync(string query, long? siteId, CancellationToken cancellationToken) public async Task<IReadOnlyList<HrmsEmployee>> SearchEmployeesAsync(string query, long? siteId, CancellationToken cancellationToken)
{ {
if (string.IsNullOrWhiteSpace(query)) return []; if (string.IsNullOrWhiteSpace(query)) return [];