UI: Unify payment request list with invoices (#4294)

Some quick win updates to the payment requests list that unify the display with the invoices list:

- Status is displayed as badge
- Amount is properly formatted
- Expiry date format and ability to switch to relative date
This commit is contained in:
d11n
2022-11-18 05:24:57 +01:00
committed by GitHub
parent ff572eef7f
commit 3942463ac9
5 changed files with 30 additions and 9 deletions

View File

@@ -74,7 +74,15 @@ namespace BTCPayServer.Controllers
IncludeArchived = includeArchived
});
model.Items = result.Select(data => new ViewPaymentRequestViewModel(data)).ToList();
model.Items = result.Select(data =>
{
var blob = data.GetBlob();
return new ViewPaymentRequestViewModel(data)
{
AmountFormatted = _Currencies.FormatCurrency(blob.Amount, blob.Currency)
};
}).ToList();
return View(model);
}