@page "/transactions" @using BudgetApp.Data.Entities @attribute [Authorize] @inject ITransactionRepository TransactionService @inject IAccountRepository AccountService @inject ICategoryRepository CategoryService @inject ISalaryRepository SalaryService @inject AuthenticationStateProvider AuthStateProvider @inject IJSRuntime JS @rendermode InteractiveServer Transactions

Transactions

Record, edit and manage your income and expenses.

Add Transaction
@if (_accountsList is not null && _accountsList.Count == 0) {
You need to create an account before adding transactions.
} else {
@if (_accountsList is not null) { @foreach (var account in _accountsList) { } }
@if (_categoriesList is not null) { @foreach (var category in _categoriesList) { } }
@if (_formModel.RecurrenceType != RecurrenceType.None) {
}
}
@if (_transactions is null) {

Loading...

} else if (_transactions.Count == 0) {
No transactions yet.
} else {
Filters
to
@foreach (var group in GroupedPagedTransactions) { @foreach (var t in OrderGroupByIncomeFirst(group)) { } }
Date @SortIndicator("date") Description @SortIndicator("description") Account Category Recurrence Amount @SortIndicator("amount")
@group.Key.ToString("dddd, d MMMM")
@if (t.SalaryId is null) { } else { 🔒 } @t.Date.ToString("MMM dd, yyyy") @t.Description @if (t.SalaryId is not null) { 💰 Salary } @t.Account.Name @if (t.Category is not null) { @if (!string.IsNullOrEmpty(t.Category.Icon)) { @t.Category.Icon } @t.Category.Name } else { — } @if (t.RecurrenceType != RecurrenceType.None) { 🔁 @GetRecurrenceLabel(t.RecurrenceType) } else if (t.ParentTransactionId is not null) { 🔁 @GetRecurrenceLabel(t.ParentTransaction?.RecurrenceType ?? RecurrenceType.None) } else { None } @(t.Type == TransactionType.Income ? "+" : "-")@t.Account.FormatAmount(t.Amount)
@if (TotalPages > 1) { } else { }
@if (_showDeleteModal) { } @if (_showEditModal) { } } @code { // Time window state // Pagination state // Sort state // Selection state // Delete confirmation state // Edit modal state }