From d7dc78eeea9de97546bf2c1faaa649bc9aee4b99 Mon Sep 17 00:00:00 2001 From: SamSys Date: Sun, 1 Dec 2024 18:19:39 +0330 Subject: [PATCH] check is active with employeeStatus --- .../Repository/RollCallEmployeeRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs b/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs index deb90fcc..f32d8f71 100644 --- a/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs @@ -125,7 +125,7 @@ public class RollCallEmployeeRepository : RepositoryBase Id = joinedRollCall == null ? 0 : joinedRollCall.id, EmployeeFullName = joinedRollCall == null ? employee.FullName : joinedRollCall.EmployeeFullName, NationalCode = employee.NationalCode, - IsActiveString = joinedRollCall == null ? "false" : joinedRollCall.IsActiveString, + IsActiveString = joinedRollCall.EmployeesStatus.Any(y => y.StartDate.Date <= dateNow.Date && y.EndDate.Date > dateNow.Date) ? "true" : "false", HasUploadedImage = joinedRollCall == null ? "false" : joinedRollCall.HasUploadedImage };