2023-09-13 02:02:02 +02:00
|
|
|
@using BTCPayServer.Client
|
2022-04-12 09:55:10 +02:00
|
|
|
@model BTCPayServer.Components.StoreNumbers.StoreNumbersViewModel
|
|
|
|
|
2022-07-06 05:40:16 +02:00
|
|
|
<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
|
|
|
|
{
|
2023-09-13 02:02:02 +02:00
|
|
|
<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>
|
2022-07-06 05:40:16 +02:00
|
|
|
<div class="store-number">
|
|
|
|
<header>
|
|
|
|
<h6>Payouts Pending</h6>
|
2023-09-13 02:02:02 +02:00
|
|
|
<a asp-controller="UIStorePullPayments" asp-action="Payouts" asp-route-storeId="@Model.Store.Id" permission="@Policies.CanManagePullPayments">Manage</a>
|
2022-07-06 05:40:16 +02:00
|
|
|
</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>
|
|
|
|
}
|
2022-04-12 09:55:10 +02:00
|
|
|
</div>
|