From d92266b0273d5c706e9e478717fbe7dbbd9f95ad Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Wed, 10 Jun 2026 14:20:20 -0400 Subject: [PATCH] Fix empty state showing Create First button when a filter is active Jobs: use AllJobCount (global total) to distinguish truly-empty from filter-returned-nothing; show Clear Filters button in the latter case. Quotes: expand the filter-active check to include tagFilter and statusCode, which were missing from the condition. Co-Authored-By: Claude Sonnet 4.6 --- src/PowderCoating.Web/Views/Jobs/Index.cshtml | 36 ++++++++++++++----- .../Views/Quotes/Index.cshtml | 4 +-- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/PowderCoating.Web/Views/Jobs/Index.cshtml b/src/PowderCoating.Web/Views/Jobs/Index.cshtml index 4955d33..1074efd 100644 --- a/src/PowderCoating.Web/Views/Jobs/Index.cshtml +++ b/src/PowderCoating.Web/Views/Jobs/Index.cshtml @@ -162,10 +162,20 @@
No jobs found
-

Get started by creating your first job

- - Create Your First Job - + @if (_allCount > 0) + { +

No jobs match your current filter.

+ + Clear Filters + + } + else + { +

Get started by creating your first job.

+ + Create Your First Job + + }
} else @@ -328,10 +338,20 @@
No jobs found
-

Get started by creating your first job

- - Create Your First Job - + @if (_allCount > 0) + { +

No jobs match your current filter.

+ + Clear Filters + + } + else + { +

Get started by creating your first job.

+ + Create Your First Job + + }
} else diff --git a/src/PowderCoating.Web/Views/Quotes/Index.cshtml b/src/PowderCoating.Web/Views/Quotes/Index.cshtml index a7f3279..9dc3da6 100644 --- a/src/PowderCoating.Web/Views/Quotes/Index.cshtml +++ b/src/PowderCoating.Web/Views/Quotes/Index.cshtml @@ -294,9 +294,9 @@

No quotes found.

- @if (!string.IsNullOrEmpty(searchTerm) || statusFilter.HasValue) + @if (!string.IsNullOrEmpty(searchTerm) || statusFilter.HasValue || !string.IsNullOrEmpty(statusCode) || !string.IsNullOrEmpty(ViewBag.TagFilter as string)) { -

Try adjusting your filters or view all quotes.

+

No quotes match your current filter. View all quotes.

} else {