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 <noreply@anthropic.com>
This commit is contained in:
@@ -162,10 +162,20 @@
|
|||||||
<div class="text-center py-5">
|
<div class="text-center py-5">
|
||||||
<i class="bi bi-inbox" style="font-size: 4rem; color: #d1d5db;"></i>
|
<i class="bi bi-inbox" style="font-size: 4rem; color: #d1d5db;"></i>
|
||||||
<h5 class="mt-3 text-muted">No jobs found</h5>
|
<h5 class="mt-3 text-muted">No jobs found</h5>
|
||||||
<p class="text-muted mb-4">Get started by creating your first job</p>
|
@if (_allCount > 0)
|
||||||
<a asp-action="Create" class="btn btn-primary">
|
{
|
||||||
<i class="bi bi-plus-circle me-2"></i>Create Your First Job
|
<p class="text-muted mb-4">No jobs match your current filter.</p>
|
||||||
</a>
|
<a href="@Url.Action("Index", new { statusGroup = "active" })" class="btn btn-outline-secondary">
|
||||||
|
<i class="bi bi-x-circle me-2"></i>Clear Filters
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<p class="text-muted mb-4">Get started by creating your first job.</p>
|
||||||
|
<a asp-action="Create" class="btn btn-primary">
|
||||||
|
<i class="bi bi-plus-circle me-2"></i>Create Your First Job
|
||||||
|
</a>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -328,10 +338,20 @@
|
|||||||
<div class="text-center py-5">
|
<div class="text-center py-5">
|
||||||
<i class="bi bi-inbox" style="font-size: 4rem; color: #d1d5db;"></i>
|
<i class="bi bi-inbox" style="font-size: 4rem; color: #d1d5db;"></i>
|
||||||
<h5 class="mt-3 text-muted">No jobs found</h5>
|
<h5 class="mt-3 text-muted">No jobs found</h5>
|
||||||
<p class="text-muted mb-4">Get started by creating your first job</p>
|
@if (_allCount > 0)
|
||||||
<a asp-action="Create" class="btn btn-primary">
|
{
|
||||||
<i class="bi bi-plus-circle me-2"></i>Create Your First Job
|
<p class="text-muted mb-4">No jobs match your current filter.</p>
|
||||||
</a>
|
<a href="@Url.Action("Index", new { statusGroup = "active" })" class="btn btn-outline-secondary">
|
||||||
|
<i class="bi bi-x-circle me-2"></i>Clear Filters
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<p class="text-muted mb-4">Get started by creating your first job.</p>
|
||||||
|
<a asp-action="Create" class="btn btn-primary">
|
||||||
|
<i class="bi bi-plus-circle me-2"></i>Create Your First Job
|
||||||
|
</a>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -294,9 +294,9 @@
|
|||||||
<div class="text-center py-5">
|
<div class="text-center py-5">
|
||||||
<i class="bi bi-file-text" style="font-size: 4rem; color: #ccc;"></i>
|
<i class="bi bi-file-text" style="font-size: 4rem; color: #ccc;"></i>
|
||||||
<p class="text-muted mt-3">No quotes found.</p>
|
<p class="text-muted mt-3">No quotes found.</p>
|
||||||
@if (!string.IsNullOrEmpty(searchTerm) || statusFilter.HasValue)
|
@if (!string.IsNullOrEmpty(searchTerm) || statusFilter.HasValue || !string.IsNullOrEmpty(statusCode) || !string.IsNullOrEmpty(ViewBag.TagFilter as string))
|
||||||
{
|
{
|
||||||
<p class="text-muted">Try adjusting your filters or <a asp-action="Index" asp-controller="Quotes">view all quotes</a>.</p>
|
<p class="text-muted">No quotes match your current filter. <a asp-action="Index" asp-controller="Quotes">View all quotes</a>.</p>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user