37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
@inject IEntryService EntryService
|
|
|
|
<div class="dialog-backdrop">
|
|
<div class="dialog-content" @onclick:stopPropagation="true">
|
|
<h5>@(EditEntry != null ? "Buchung bearbeiten" : "Neue Buchung")</h5>
|
|
|
|
<div class="form-container">
|
|
@if (EditEntry == null)
|
|
{
|
|
<label class="form-label">Art</label>
|
|
<select @bind="entryType">
|
|
<option value="@EntryType.Income">Einnahme</option>
|
|
<option value="@EntryType.Expense">Ausgabe</option>
|
|
</select>
|
|
}
|
|
|
|
<label class="form-label">Datum</label>
|
|
<input type="date" @bind="date" />
|
|
|
|
<label class="form-label">Bezeichnung</label>
|
|
<input type="text" class="form-control" @bind="title" placeholder="Beschreibung" />
|
|
|
|
<label class="form-label">Betrag (€)</label>
|
|
<input type="number" class="form-control no-spinner" @bind="amount" step="0.01" min="0.01" />
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-end gap-2">
|
|
<button class="btn btn-success" @onclick="Save"
|
|
disabled="@(string.IsNullOrWhiteSpace(title) || amount <= 0)">
|
|
<i class="bi bi-check-lg"></i> @(EditEntry != null ? "Speichern" : "Hinzufügen")
|
|
</button>
|
|
<button class="btn btn-outline-secondary" @onclick="Cancel"><i class="bi bi-x-lg"></i> Abbrechen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|