WIP
This commit is contained in:
1 parent
2bfe914c8f
commit
4281924ee5
16 files changed
+369
-76
No files matched your search
@@ -139,6 +139,29 @@ else
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (_nextPayday.HasValue && _predictedPaydayBalances.Count > 0)
|
||||
{
|
||||
<div class="card mb-4 border-success border-opacity-25">
|
||||
<div class="card-body py-2 px-3">
|
||||
<div class="d-flex flex-wrap align-items-center gap-3">
|
||||
<span class="text-muted" style="font-size: 0.85rem;">
|
||||
💰 Predicted balance before next payday <strong>@_nextPayday.Value.ToString("MMM d")</strong>:
|
||||
</span>
|
||||
@foreach (var account in _data!.Accounts)
|
||||
{
|
||||
if (_predictedPaydayBalances.TryGetValue(account.Id, out var pred))
|
||||
{
|
||||
<span class="fw-semibold @(pred >= 0 ? "text-success" : "text-danger")" style="font-size: 0.9rem;">
|
||||
<span class="badge me-1" style="background-color: @account.Color; font-size: 0.7rem;">@account.Name</span>
|
||||
@account.FormatAmount(pred)
|
||||
</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center flex-wrap gap-2">
|
||||
<ul class="nav nav-tabs card-header-tabs" style="flex-grow: 0;">
|
||||
@@ -184,8 +207,13 @@ else
|
||||
else
|
||||
{
|
||||
<div class="list-group list-group-flush">
|
||||
@foreach (var t in FilteredRecent.Skip((_recentPage - 1) * PageSize).Take(PageSize))
|
||||
@foreach (var group in GroupedRecentPage)
|
||||
{
|
||||
<div class="list-group-item py-1 px-3" style="background: rgba(0,0,0,0.03); border-left: none; font-size: 0.78rem;">
|
||||
<span class="text-muted fw-semibold">@group.Key.ToString("dddd, d MMMM")</span>
|
||||
</div>
|
||||
@foreach (var t in OrderGroupByIncomeFirst(group))
|
||||
{
|
||||
<div class="list-group-item list-group-item-action txn-row @(_selectedTransactionId == t.Id ? "txn-row-selected" : "")"
|
||||
style="cursor: pointer; border-left: 3px solid @(t.Type == TransactionType.Income ? "#198754" : "#dc3545");"
|
||||
@onclick="() => SelectTransaction(t.Id)">
|
||||
@@ -237,8 +265,9 @@ else
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (RecentTotalPages > 1)
|
||||
}
|
||||
</div>
|
||||
@if (RecentTotalPages > 1)
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center px-3 py-2 border-top">
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled="@(_recentPage <= 1 ? true : (bool?)null)" @onclick="() => _recentPage--">← Prev</button>
|
||||
@@ -257,8 +286,13 @@ else
|
||||
else
|
||||
{
|
||||
<div class="list-group list-group-flush">
|
||||
@foreach (var t in FilteredUpcoming.Skip((_upcomingPage - 1) * PageSize).Take(PageSize))
|
||||
@foreach (var group in GroupedUpcomingPage)
|
||||
{
|
||||
<div class="list-group-item py-1 px-3" style="background: rgba(0,0,0,0.03); border-left: none; font-size: 0.78rem;">
|
||||
<span class="text-muted fw-semibold">@group.Key.ToString("dddd, d MMMM")</span>
|
||||
</div>
|
||||
@foreach (var t in OrderGroupByIncomeFirst(group))
|
||||
{
|
||||
<div class="list-group-item list-group-item-action txn-row @(_selectedTransactionId == t.Id ? "txn-row-selected" : "")"
|
||||
style="cursor: pointer; border-left: 3px solid @(t.Type == TransactionType.Income ? "#198754" : "#dc3545");"
|
||||
@onclick="() => SelectTransaction(t.Id)">
|
||||
@@ -307,6 +341,7 @@ else
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@if (UpcomingTotalPages > 1)
|
||||
|
||||
Reference in new issue
Block a user