Add pull payment grouping options (#3177)

* Add grouping by payment methods

* Add filtering by pull payment state

* Hide "Archive" button for archived pull payments

* Don't show payment methods bar if there is only one

* Add "All" payment method option

* Remove filtering by payment method

* Update state queries to not run on the client

* Add filtering by future pull payments
This commit is contained in:
Umar Bolatov
2022-02-17 01:13:28 -08:00
committed by GitHub
parent 5c8ca15ee2
commit 9a3a7a3444
4 changed files with 87 additions and 18 deletions

View File

@@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc.Rendering;
using BTCPayServer.Payments;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Models.WalletViewModels
{
@@ -26,9 +28,13 @@ namespace BTCPayServer.Models.WalletViewModels
public ProgressModel Progress { get; set; }
public DateTimeOffset StartDate { get; set; }
public DateTimeOffset? EndDate { get; set; }
public bool Archived { get; set; } = false;
}
public List<PullPaymentModel> PullPayments { get; set; } = new List<PullPaymentModel>();
public string PaymentMethodId { get; set; }
public IEnumerable<PaymentMethodId> PaymentMethods { get; set; }
public PullPaymentState ActiveState { get; set; } = PullPaymentState.Active;
}
public class NewPullPaymentModel