Refactor AddEntryDialog and AccountDetail for improved UI consistency; remove unused AddYearDialog; enhance Dashboard layout and button styles
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
<h5>@(EditEntry != null ? "Eintrag bearbeiten" : "Neuer Eintrag")</h5>
|
||||
|
||||
<div class="form-container">
|
||||
@if(EditEntry == null) {
|
||||
@if (EditEntry == null)
|
||||
{
|
||||
<label class="form-label">Art</label>
|
||||
<select @bind="entryType">
|
||||
<option value="@EntryType.Income">Einnahme</option>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
@* AddYearDialog is no longer used - year management has been removed from the data model. *@
|
||||
@@ -15,15 +15,33 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex align-items-center gap-2 mb-3">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<div class="d-flex align-items-center flex-grow-1" style="min-width: 0;">
|
||||
<h2 class="mb-0 mt-0" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
<h1 class="mb-0 mt-0" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
@account.Name
|
||||
<button class="btn-edit-pen" @onclick="() => showEditName = true" title="Name bearbeiten"><i class="bi bi-pencil"></i></button>
|
||||
</h2>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center gap-2 py-3 flex-wrap">
|
||||
<button class="btn btn-secondary btn-nav" @onclick="NavigateBack">
|
||||
<i class="bi bi-arrow-left"></i> Zurück
|
||||
</button>
|
||||
<button class="btn btn-success btn-nav" @onclick="() => showAddEntry = true">
|
||||
<i class="bi bi-plus-lg"></i> Eintrag
|
||||
</button>
|
||||
<button class="btn btn-info btn-nav" @onclick="() => showAddTransfer = true">
|
||||
<i class="bi bi-arrow-left-right"></i> Umbuchung
|
||||
</button>
|
||||
<button class="btn btn-dark btn-nav" @onclick="HandleExport">
|
||||
<i class="bi bi-file-earmark-pdf"></i> PDF
|
||||
</button>
|
||||
<button class="btn btn-nav @(showCurrentYearOnly ? "btn-primary" : "btn-outline-secondary")" @onclick="ToggleYearFilter">
|
||||
<i class="bi bi-funnel"></i> @(showCurrentYearOnly ? $"Nur {DateTime.Now.Year}" : "Alle Einträge")
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (balance != null)
|
||||
{
|
||||
<div class="summary-section">
|
||||
@@ -69,23 +87,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
<div class="d-flex align-items-center gap-2 mb-3 py-3 flex-wrap">
|
||||
<button class="btn btn-secondary btn-sm" @onclick="NavigateBack">
|
||||
<i class="bi bi-arrow-left"></i> Zurück
|
||||
</button>
|
||||
<button class="btn btn-success btn-sm" @onclick="() => showAddEntry = true">
|
||||
<i class="bi bi-plus-lg"></i> Eintrag
|
||||
</button>
|
||||
<button class="btn btn-info btn-sm" @onclick="() => showAddTransfer = true">
|
||||
<i class="bi bi-arrow-left-right"></i> Umbuchung
|
||||
</button>
|
||||
<button class="btn btn-dark btn-sm" @onclick="HandleExport">
|
||||
<i class="bi bi-file-earmark-pdf"></i> PDF
|
||||
</button>
|
||||
<button class="btn btn-sm @(showCurrentYearOnly ? "btn-primary" : "btn-outline-secondary")" @onclick="ToggleYearFilter">
|
||||
<i class="bi bi-funnel"></i> @(showCurrentYearOnly ? $"Nur {DateTime.Now.Year}" : "Alle Einträge")
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (entries != null)
|
||||
{
|
||||
|
||||
@@ -3,25 +3,24 @@
|
||||
@inject ISettingsService SettingsService
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="d-flex align-items-center flex-grow-1" style="min-width: 0;">
|
||||
<h2 class="mb-0 mt-0" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
<h1 class="mb-0 mt-0" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
@DisplayClubName
|
||||
<button class="btn-edit-pen" @onclick="() => showEditClubName = true" title="Vereinsname bearbeiten">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<button class="btn btn-primary" @onclick="() => showAddAccount = true">
|
||||
<i class="bi bi-plus-lg"></i> Neues Konto
|
||||
</button>
|
||||
<a class="btn btn-outline-secondary" href="/settings">
|
||||
<i class="bi bi-gear"></i> Einstellungen
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center gap-2 py-3 flex-wrap">
|
||||
<button class="btn-nav 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">
|
||||
@@ -48,11 +47,8 @@
|
||||
|
||||
@if (showEditClubName)
|
||||
{
|
||||
<EditNameDialog CurrentName="clubName"
|
||||
DialogTitle="Vereinsname bearbeiten"
|
||||
NameLabel="Vereinsname"
|
||||
OnSave="HandleSaveClubName"
|
||||
OnCancel="() => showEditClubName = false" />
|
||||
<EditNameDialog CurrentName="@DisplayClubName" DialogTitle="Vereinsname bearbeiten" NameLabel="Vereinsname"
|
||||
OnSave="HandleSaveClubName" OnCancel="() => showEditClubName = false" />
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
@@ -184,6 +184,20 @@ html, body {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.btn-nav {
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
justify-content: center;
|
||||
font-size: 0.8rem !important;
|
||||
}
|
||||
|
||||
.btn-nav i {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--color-accent);
|
||||
border-color: var(--color-accent);
|
||||
|
||||
Reference in New Issue
Block a user