@if (activeTab == "recent")
{
@if (data.RecentTransactions.Count == 0)
{
No recent transactions.
}
else
{
@foreach (var t in data.RecentTransactions.Skip((recentPage - 1) * PageSize).Take(PageSize))
{
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)
@(t.Type == TransactionType.Income ? "Income" : "Expense")
@if (selectedTransactionId == t.Id)
{
}
}
@if (RecentTotalPages > 1)
{
Page @recentPage of @RecentTotalPages
}
}
}
else
{
@if (data.UpcomingTransactions.Count == 0)
{
No upcoming transactions.
}
else
{
@foreach (var t in data.UpcomingTransactions.Skip((upcomingPage - 1) * PageSize).Take(PageSize))
{
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)
{
}
}
@if (UpcomingTotalPages > 1)
{
Page @upcomingPage of @UpcomingTotalPages
}
}
}