2019-01-14 22:43:29 +01:00
|
|
|
@using BTCPayServer.Services.PaymentRequests
|
|
|
|
@model BTCPayServer.Models.PaymentRequestViewModels.ListPaymentRequestsViewModel
|
|
|
|
@{
|
|
|
|
Layout = "_Layout";
|
2019-11-15 14:43:36 +01:00
|
|
|
ViewData["Title"] = "Payment Requests";
|
2019-01-14 22:43:29 +01:00
|
|
|
}
|
2021-04-08 15:32:42 +02:00
|
|
|
|
2021-12-11 04:32:23 +01:00
|
|
|
<partial name="_StatusMessage" />
|
|
|
|
|
|
|
|
<div class="d-sm-flex align-items-center justify-content-between mb-4">
|
|
|
|
<h2 class="mb-0">
|
|
|
|
@ViewData["Title"]
|
|
|
|
<small>
|
|
|
|
<a href="https://docs.btcpayserver.org/PaymentRequests/" class="ms-1" target="_blank" rel="noreferrer noopener">
|
|
|
|
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
2021-04-08 15:32:42 +02:00
|
|
|
</a>
|
2021-12-11 04:32:23 +01:00
|
|
|
</small>
|
|
|
|
</h2>
|
|
|
|
<a asp-action="EditPaymentRequest" asp-route-storeId="@Context.GetStoreData().Id" class="btn btn-primary mt-3 mt-sm-0" role="button" id="CreatePaymentRequest">
|
|
|
|
<span class="fa fa-plus"></span>
|
2021-12-28 07:54:31 +01:00
|
|
|
Create Payment Request
|
2021-12-11 04:32:23 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
2020-07-19 23:49:13 +02:00
|
|
|
|
2021-12-11 04:32:23 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12 col-lg-6 mb-3 ms-auto">
|
|
|
|
<form asp-action="GetPaymentRequests" method="get">
|
|
|
|
<input type="hidden" asp-for="Count"/>
|
|
|
|
<input type="hidden" asp-for="TimezoneOffset" />
|
|
|
|
<div class="input-group">
|
|
|
|
<input asp-for="SearchTerm" class="form-control" style="width:300px;"/>
|
|
|
|
<button type="submit" class="btn btn-secondary" title="Search invoice">
|
|
|
|
<span class="fa fa-search"></span> Search
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<span class="visually-hidden">Toggle Dropdown</span>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu dropdown-menu-end">
|
|
|
|
<a class="dropdown-item" asp-action="GetPaymentRequests" asp-route-storeId="@Context.GetStoreData().Id" asp-route-count="@Model.Count" asp-route-searchTerm="includearchived:true">Include Archived Payment Reqs</a>
|
|
|
|
<div role="separator" class="dropdown-divider"></div>
|
|
|
|
<a class="dropdown-item" href="?searchTerm=">Unfiltered</a>
|
|
|
|
</div>
|
2019-01-14 22:43:29 +01:00
|
|
|
</div>
|
2021-12-11 04:32:23 +01:00
|
|
|
<span asp-validation-for="SearchTerm" class="text-danger"></span>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-24 06:57:07 +02:00
|
|
|
|
2021-12-11 04:32:23 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
@if (Model.Total > 0)
|
|
|
|
{
|
|
|
|
<table class="table table-hover table-responsive-md">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Title</th>
|
|
|
|
<th>Expiry</th>
|
|
|
|
<th class="text-end">Price</th>
|
|
|
|
<th class="text-end">Status</th>
|
|
|
|
<th class="text-end">Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach (var item in Model.Items)
|
|
|
|
{
|
|
|
|
<tr>
|
|
|
|
<td>@item.Title</td>
|
|
|
|
<td>@(item.ExpiryDate?.ToString("g") ?? "No Expiry")</td>
|
|
|
|
<td class="text-end">@item.Amount @item.Currency</td>
|
|
|
|
<td class="text-end">@item.Status</td>
|
|
|
|
<td class="text-end">
|
|
|
|
<a asp-action="EditPaymentRequest" asp-route-storeId="@item.StoreId" asp-route-payReqId="@item.Id">Edit</a>
|
|
|
|
<span> - </span>
|
|
|
|
<a asp-action="ViewPaymentRequest" asp-route-payReqId="@item.Id">View</a>
|
|
|
|
<span> - </span>
|
|
|
|
<a target="_blank" asp-controller="Invoice" asp-action="ListInvoices" asp-route-searchterm="@($"orderid:{PaymentRequestRepository.GetOrderIdForPaymentRequest(item.Id)}")">Invoices</a>
|
|
|
|
<span> - </span>
|
|
|
|
<a target="_blank" asp-action="PayPaymentRequest" asp-route-payReqId="@item.Id">Pay</a>
|
|
|
|
<span> - </span>
|
|
|
|
<a target="_blank" asp-action="ClonePaymentRequest" asp-route-storeId="@item.StoreId" asp-route-payReqId="@item.Id">Clone</a>
|
|
|
|
<span> - </span>
|
|
|
|
<a asp-action="TogglePaymentRequestArchival" asp-route-storeId="@item.StoreId" asp-route-payReqId="@item.Id">@(item.Archived ? "Unarchive" : "Archive")</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2019-06-06 11:47:31 +02:00
|
|
|
|
2021-12-11 04:32:23 +01:00
|
|
|
<vc:pager view-model="Model" />
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<p class="text-secondary mt-3">
|
|
|
|
There are no payment requests matching your criteria.
|
|
|
|
</p>
|
|
|
|
}
|
2019-01-14 22:43:29 +01:00
|
|
|
</div>
|
2021-12-11 04:32:23 +01:00
|
|
|
</div>
|