Files
duempelkas/src/Duempelkas.App/Components/Accounts/EntryRow.razor
T

37 lines
1.4 KiB
Plaintext

<tr class="@GetRowClass()">
<td>@Entry.DisplayId</td>
<td>@Entry.Date.ToString("dd.MM.yyyy")</td>
<td>
@Entry.Title
@if (Entry.IsTransfer && !string.IsNullOrEmpty(Entry.LinkedAccountName))
{
<small class="text-muted ms-1">
(@(Entry.Type == EntryType.Expense ? "an" : "von") @Entry.LinkedAccountName)
</small>
}
</td>
<td class="text-end @(Entry.Type == EntryType.Income ? "amount-positive" : "amount-negative")">
@(Entry.Type == EntryType.Income ? "+" : "\u2212")@($"{Entry.Amount:N2} €")
</td>
<td>
@if (Entry.IsDeleted)
{
<button class="btn btn-outline-success btn-sm" @onclick="() => OnRestore.InvokeAsync(Entry.Id)" title="Wiederherstellen">
<i class="bi bi-arrow-counterclockwise"></i>
</button>
}
else
{
<div class="d-flex gap-1">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => OnEdit.InvokeAsync(Entry.Id)" title="Bearbeiten">
<i class="bi bi-pencil"></i>
</button>
<button class="btn btn-outline-danger btn-sm" @onclick="() => OnDelete.InvokeAsync(Entry.Id)" title="Löschen">
<i class="bi bi-trash"></i>
</button>
</div>
}
</td>
</tr>