mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Adjust the prior number of transactions metric as discussed with @pavlenex. We now show the number of paid invoices instead of transactions, as this metric is more meaningful. Closes #5300.
49 lines
1.9 KiB
Text
49 lines
1.9 KiB
Text
@using BTCPayServer.Client
|
|
@model BTCPayServer.Components.StoreNumbers.StoreNumbersViewModel
|
|
|
|
<div class="widget store-numbers" id="StoreNumbers-@Model.Store.Id">
|
|
@if (Model.InitialRendering)
|
|
{
|
|
<div class="loading d-flex justify-content-center p-3">
|
|
<div class="spinner-border text-light" role="status">
|
|
<span class="visually-hidden">Loading...</span>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
(async () => {
|
|
const url = @Safe.Json(Url.Action("StoreNumbers", "UIStores", new { storeId = Model.Store.Id, cryptoCode = Model.CryptoCode }));
|
|
const storeId = @Safe.Json(Model.Store.Id);
|
|
const response = await fetch(url);
|
|
if (response.ok) {
|
|
document.getElementById(`StoreNumbers-${storeId}`).outerHTML = await response.text();
|
|
}
|
|
})();
|
|
</script>
|
|
}
|
|
else
|
|
{
|
|
<div class="store-number">
|
|
<header>
|
|
<h6>Paid invoices in the last @Model.TimeframeDays days</h6>
|
|
@if (Model.PaidInvoices > 0)
|
|
{
|
|
<a asp-controller="UIInvoice" asp-action="ListInvoices" asp-route-storeId="@Model.Store.Id" permission="@Policies.CanViewInvoices">View All</a>
|
|
}
|
|
</header>
|
|
<div class="h3">@Model.PaidInvoices</div>
|
|
</div>
|
|
<div class="store-number">
|
|
<header>
|
|
<h6>Payouts Pending</h6>
|
|
<a asp-controller="UIStorePullPayments" asp-action="Payouts" asp-route-storeId="@Model.Store.Id" permission="@Policies.CanManagePullPayments">Manage</a>
|
|
</header>
|
|
<div class="h3">@Model.PayoutsPending</div>
|
|
</div>
|
|
<div class="store-number">
|
|
<header>
|
|
<h6>Refunds Issued</h6>
|
|
</header>
|
|
<div class="h3">@Model.RefundsIssued</div>
|
|
</div>
|
|
}
|
|
</div>
|