46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
@using BTCPayServer.Client.Models
|
|
<div @attributes="InputAttributes" class="invoice-list @InputAttributes?["class"]">
|
|
@if (Loading)
|
|
{
|
|
<div class="p-3 text-center">
|
|
<LoadingIndicator/>
|
|
</div>
|
|
}
|
|
@if (Invoices is not null)
|
|
{
|
|
@if (Invoices.Any())
|
|
{
|
|
@foreach (var i in Invoices)
|
|
{
|
|
<div class="box">
|
|
<InvoiceItem Invoice="@i"/>
|
|
</div>
|
|
}
|
|
}
|
|
else if (!string.IsNullOrEmpty(Error))
|
|
{
|
|
<Alert Type="danger">@Error</Alert>
|
|
}
|
|
else
|
|
{
|
|
<div class="box">
|
|
<p class="text-muted my-0">There are no invoices, yet.</p>
|
|
</div>
|
|
}
|
|
}
|
|
</div>
|
|
|
|
@code {
|
|
[Parameter]
|
|
public IEnumerable<InvoiceData>? Invoices { get; set; }
|
|
|
|
[Parameter]
|
|
public bool Loading { get; set; }
|
|
|
|
[Parameter]
|
|
public string? Error { get; set; }
|
|
|
|
[Parameter(CaptureUnmatchedValues = true)]
|
|
public Dictionary<string, object>? InputAttributes { get; set; }
|
|
}
|