mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Add link to the order id if there is a orderUrl
This commit is contained in:
parent
b8d509eb12
commit
35f97a6013
3 changed files with 22 additions and 1 deletions
|
@ -170,6 +170,7 @@ namespace BTCPayServer.Controllers
|
|||
{
|
||||
InvoiceId = i.Id,
|
||||
OrderId = i.Metadata?.OrderId,
|
||||
OrderUrl = i.Metadata?.OrderUrl,
|
||||
StoreName = store.StoreName,
|
||||
Status = i.Status.ToModernStatus()
|
||||
});
|
||||
|
@ -186,6 +187,7 @@ namespace BTCPayServer.Controllers
|
|||
Timestamp = i.InvoiceTime,
|
||||
InvoiceId = i.Id,
|
||||
OrderId = i.Metadata?.OrderId,
|
||||
OrderUrl = i.Metadata?.OrderUrl,
|
||||
Payments = receipt.ShowPayments is false ? null : i.GetPayments(true).Select(paymentEntity =>
|
||||
{
|
||||
var paymentData = paymentEntity.GetCryptoPaymentData();
|
||||
|
|
|
@ -18,5 +18,6 @@ namespace BTCPayServer.Models.InvoicingModels
|
|||
public Dictionary<string, object> AdditionalData { get; set; }
|
||||
public ReceiptOptions ReceiptOptions { get; set; }
|
||||
public List<ViewPaymentRequestViewModel.PaymentRequestInvoicePayment> Payments { get; set; }
|
||||
public string OrderUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,25 @@
|
|||
{
|
||||
<div class="d-flex flex-column">
|
||||
<dd class="text-muted mb-0 fw-semibold">Order ID</dd>
|
||||
<dt class="fs-5 mb-0 text-break fw-semibold">@Model.OrderId</dt>
|
||||
<dt class="fs-5 mb-0 text-break fw-semibold">
|
||||
@if (!string.IsNullOrEmpty(Model.OrderUrl))
|
||||
{
|
||||
<a href="@Model.OrderUrl" rel="noreferrer noopener" target="_blank">
|
||||
@if (string.IsNullOrEmpty(Model.OrderId))
|
||||
{
|
||||
<span>View Order</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.OrderId
|
||||
}
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@Model.OrderId</span>
|
||||
}
|
||||
</dt>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
|
|
Loading…
Add table
Reference in a new issue