Add Blazor application layer with UI components and pages

- Service interfaces and DTO models
- Dashboard page with account overview
- Account detail page with year/entry management
- Reusable components: AccountCard, EntryTable, YearSelector
- Dialog components: Add/Edit Account, Entry, Transfer, Year
- Main layout and routing configuration
This commit is contained in:
2026-03-31 17:13:09 +02:00
parent c3d68020d5
commit f5c2be9339
31 changed files with 886 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
@page "/"
@inject IAccountService AccountService
<div class="container-fluid">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2>Übersicht</h2>
<button class="btn btn-primary" @onclick="() => showAddAccount = true">
<i class="bi bi-plus-lg"></i> Neues Konto
</button>
</div>
@if (accounts == null)
{
<div class="text-center py-5">
<div class="spinner-border" role="status"></div>
</div>
}
else if (!accounts.Any())
{
<div class="text-center py-5 text-muted">
<h4>Noch keine Konten vorhanden</h4>
<p>Erstelle dein erstes Konto, um loszulegen.</p>
</div>
}
else
{
<AccountCardList Accounts="accounts" />
}
</div>
@if (showAddAccount)
{
<AddAccountDialog OnSave="HandleAccountCreated" OnCancel="() => showAddAccount = false" />
}
@code {
private List<AccountSummaryDto>? accounts;
private bool showAddAccount;
protected override async Task OnInitializedAsync()
{
await LoadAccounts();
}
private async Task LoadAccounts()
{
accounts = await AccountService.GetAllAccountsAsync();
}
private async Task HandleAccountCreated(string name)
{
await AccountService.CreateAccountAsync(name);
showAddAccount = false;
await LoadAccounts();
}
}