@if (_activeTab == "recent")
{
@if (FilteredRecent.Count == 0)
{
No recent transactions.
}
else
{
@foreach (var group in GroupedRecentPage)
{
@group.Key.ToString("dddd, d MMMM")
@foreach (var t in OrderGroupByIncomeFirst(group))
{
SelectTransaction(t.Id)">
@t.Description
@if (t.RecurrenceType != RecurrenceType.None || t.ParentTransactionId is not null)
{
🔁 @GetRecurrenceLabel(t)
}
@if (t.IsPaid)
{
✓ Paid
}
@t.Date.ToString("MMM dd, yyyy")
@t.Account.Name
@if (t.Category is not null)
{
@(string.IsNullOrEmpty(t.Category.Icon) ? "" : t.Category.Icon + " ")@t.Category.Name
}
@(t.Type == TransactionType.Income ? "+" : "−")@t.Account.FormatAmount(t.Amount)
@(t.Type == TransactionType.Income ? "Income" : "Expense")
@if (_selectedTransactionId == t.Id)
{
@if (t.IsPaid)
{
MarkAsPaid(t.Id, false)" @onclick:stopPropagation="true">↩ Unpaid
}
else
{
}
OpenEditModal(t)" @onclick:stopPropagation="true">✏️ Edit
ConfirmDelete(t)" @onclick:stopPropagation="true">🗑️ Delete
}
}
}
@if (RecentTotalPages > 1)
{
_recentPage--">← Prev
Page @_recentPage of @RecentTotalPages
_recentPage++">Next →
}
}
}
else
{
@if (FilteredUpcoming.Count == 0)
{
No upcoming transactions.
}
else
{
@foreach (var group in GroupedUpcomingPage)
{
@group.Key.ToString("dddd, d MMMM")
@foreach (var t in OrderGroupByIncomeFirst(group))
{
SelectTransaction(t.Id)">
@t.Description
@if (t.RecurrenceType != RecurrenceType.None || t.ParentTransactionId is not null)
{
🔁 @GetRecurrenceLabel(t)
}
@t.Date.ToString("MMM dd, yyyy")
@t.Account.Name
@if (t.Category is not null)
{
@(string.IsNullOrEmpty(t.Category.Icon) ? "" : t.Category.Icon + " ")@t.Category.Name
}
@(t.Type == TransactionType.Income ? "+" : "−")@t.Account.FormatAmount(t.Amount)
@if (_projectedBalances.TryGetValue(t.Id, out var projected))
{
Projected: @t.Account.FormatAmount(projected)
}
else
{
@(t.Type == TransactionType.Income ? "Income" : "Expense")
}
@if (_selectedTransactionId == t.Id)
{
MarkAsPaid(t.Id, true)" @onclick:stopPropagation="true">✅ Mark as Paid
OpenEditModal(t)" @onclick:stopPropagation="true">✏️ Edit
ConfirmDelete(t)" @onclick:stopPropagation="true">🗑️ Delete
}
}
}
@if (UpcomingTotalPages > 1)
{
_upcomingPage--">← Prev
Page @_upcomingPage of @UpcomingTotalPages
_upcomingPage++">Next →
}
}
}