32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
@page "/"
|
|
@page "/invoices"
|
|
@using Server.Model
|
|
@rendermode InteractiveServer
|
|
|
|
<h3>Rechnungen (@((Invoices ?? []).Count))</h3>
|
|
|
|
<a href="/create" class="btn btn-primary">Neue Rechnung</a>
|
|
<hr />
|
|
<div class="row">
|
|
@foreach (var invoice in Invoices ?? [])
|
|
{
|
|
<div class="col-md-auto pt-3">
|
|
<div class="card" style="width: 18rem;">
|
|
<div class="card-body">
|
|
<h5 class="card-title">#@invoice.InvoiceId</h5>
|
|
<h6 class="card-subtitle mb-2 text-muted">@invoice.IssueDate.ToShortDateString()</h6>
|
|
<p class="card-text">
|
|
@invoice.Customer?.Name<br />
|
|
@invoice.Items.Count Artikel<br />
|
|
@($"{invoice.TotalNetto:N2} €") Netto<br />
|
|
</p>
|
|
<a href="@($"edit/{invoice.InvoiceId}")" class="btn btn-sm btn-primary">Bearbeiten</a>
|
|
@if (invoice.DeletionAllowed)
|
|
{
|
|
<button class="btn btn-sm btn-danger" style="margin-left: .5rem;" @onclick="() => DeleteInvoiceAsync(invoice.InvoiceId)">Löschen</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div> |