change the employee fetching logic in employe suspend employee
This commit is contained in:
parent
b4cb81772e
commit
889b5a84b6
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user