mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
2846c38ff5
* Invoice: Unify status display and functionality Consolidates the invoice status display and functionality (mark setted or invalid) across the dashboard, list and details pages. * Test fix --------- Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
23 lines
688 B
C#
23 lines
688 B
C#
using System.Collections.Generic;
|
|
using BTCPayServer.Services.Invoices;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BTCPayServer.Components.InvoiceStatus
|
|
{
|
|
public class InvoiceStatus : ViewComponent
|
|
{
|
|
public IViewComponentResult Invoke(InvoiceState state, List<PaymentEntity> payments, string invoiceId, bool isArchived = false, bool hasRefund = false)
|
|
{
|
|
var vm = new InvoiceStatusViewModel
|
|
{
|
|
State = state,
|
|
Payments = payments,
|
|
InvoiceId = invoiceId,
|
|
IsArchived = isArchived,
|
|
HasRefund = hasRefund
|
|
};
|
|
return View(vm);
|
|
}
|
|
}
|
|
}
|