diff --git a/src/PowderCoating.Web/Controllers/DashboardController.cs b/src/PowderCoating.Web/Controllers/DashboardController.cs index 08ffb93..a353c23 100644 --- a/src/PowderCoating.Web/Controllers/DashboardController.cs +++ b/src/PowderCoating.Web/Controllers/DashboardController.cs @@ -695,7 +695,10 @@ public class DashboardController : Controller // These share the same scoped DbContext so must run sequentially var hasStatusHistory = await _unitOfWork.JobStatusHistory.AnyAsync(_ => true); - var hasCustomizedLookups = await _unitOfWork.JobStatusLookups.AnyAsync(j => j.UpdatedAt != null); + // ignoreQueryFilters so soft-deleted lookups (UpdatedAt set on delete) are also visible + var hasCustomizedLookups = await _unitOfWork.JobStatusLookups.AnyAsync( + j => j.CompanyId == companyId && j.UpdatedAt != null, + ignoreQueryFilters: true); var teamCount = await _userManager.Users .CountAsync(u => u.CompanyId == companyId && u.IsActive && !u.IsBanned); var (_, maxUsers) = await _subscriptionService.GetUserCountAsync(companyId);