Hide spending by category when only one category exists

Both the doughnut chart and top categories table are now hidden
when there's only a single category, as they provide no useful
breakdown in that case. The net cash flow chart expands to full
width when the category chart is hidden.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 20:17:19 -05:00
parent 7725bdb159
commit 2f3047d432

View File

@@ -117,6 +117,8 @@
</div>
</div>
<div class="row g-3 my-2">
@if (Model.TopCategories.Count > 1)
{
<div class="col-lg-6">
<div class="card shadow-sm h-100">
<div class="card-header">Spending by category (last 90 days)</div>
@@ -125,7 +127,8 @@
</div>
</div>
</div>
<div class="col-lg-6">
}
<div class="@(Model.TopCategories.Count > 1 ? "col-lg-6" : "col-lg-12")">
<div class="card shadow-sm h-100">
<div class="card-header">Net cash flow (last 30 days)</div>
<div class="card-body">
@@ -206,7 +209,7 @@
</div>
}
@if (Model.TopCategories.Any())
@if (Model.TopCategories.Count > 1)
{
<div class="card shadow-sm mb-3">
<div class="card-header">