change the employee fetching logic in employe suspend employee

This commit is contained in:
ashutosh.nehete 2025-08-19 11:46:14 +05:30
parent b4cb81772e
commit 889b5a84b6

View File

@ -516,7 +516,7 @@ namespace MarcoBMS.Services.Controllers
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedEmployee = await _userHelper.GetCurrentEmployeeAsync();
Employee? employee = await _context.Employees.FirstOrDefaultAsync(e => e.Id == id && e.IsActive && e.TenantId == tenantId);
Employee? employee = await _context.Employees.FirstOrDefaultAsync(e => e.Id == id && e.TenantId == tenantId);
if (employee == null)
{
_logger.LogWarning("Employee with ID {EmploueeId} not found in database", id);