Introduce Server paging for Payouts List (#2564)

* Introduce Server paging for Payouts List

* Add paging params

* Minor code and formatting improvements

* View updates

* Apply suggestions from code review

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

* fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
This commit is contained in:
Andrew Camilleri
2021-06-30 08:59:01 +01:00
committed by GitHub
parent 33de4cccfc
commit 6c856aba48
5 changed files with 267 additions and 270 deletions

View File

@@ -4,6 +4,7 @@ using BTCPayServer.Models;
using BTCPayServer.Models.InvoicingModels;
using BTCPayServer.Models.PaymentRequestViewModels;
using BTCPayServer.Models.ServerViewModels;
using BTCPayServer.Models.WalletViewModels;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
@@ -21,6 +22,8 @@ namespace BTCPayServer
prop = typeof(UserPrefsCookie).GetProperty(nameof(UserPrefsCookie.PaymentRequestsQuery));
else if (model is UsersViewModel)
prop = typeof(UserPrefsCookie).GetProperty(nameof(UserPrefsCookie.UsersQuery));
else if (model is PayoutsModel)
prop = typeof(UserPrefsCookie).GetProperty(nameof(UserPrefsCookie.UsersQuery));
else
throw new Exception("Unsupported BasePagingViewModel for cookie user preferences saving");
@@ -78,6 +81,7 @@ namespace BTCPayServer
public ListQueryDataHolder PaymentRequestsQuery { get; set; }
public ListQueryDataHolder UsersQuery { get; set; }
public ListQueryDataHolder PayoutsQuery { get; set; }
}
class ListQueryDataHolder