mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 10:40:29 +01:00
6c856aba48
* 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>
39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using BTCPayServer.Client.Models;
|
|
using BTCPayServer.Payments;
|
|
|
|
namespace BTCPayServer.Models.WalletViewModels
|
|
{
|
|
public class PayoutsModel : BasePagingViewModel
|
|
{
|
|
public string PullPaymentId { get; set; }
|
|
public string Command { get; set; }
|
|
public Dictionary<PayoutState, int> PayoutStateCount { get; set; }
|
|
public PaymentMethodId PaymentMethodId { get; set; }
|
|
|
|
public List<PayoutModel> Payouts { get; set; }
|
|
public PayoutState PayoutState { get; set; }
|
|
public string PullPaymentName { get; set; }
|
|
|
|
public class PayoutModel
|
|
{
|
|
public string PayoutId { get; set; }
|
|
public bool Selected { get; set; }
|
|
public DateTimeOffset Date { get; set; }
|
|
public string PullPaymentId { get; set; }
|
|
public string PullPaymentName { get; set; }
|
|
public string Destination { get; set; }
|
|
public string Amount { get; set; }
|
|
public string ProofLink { get; set; }
|
|
}
|
|
|
|
public string[] GetSelectedPayouts(PayoutState state)
|
|
{
|
|
return Payouts.Where(model => model.Selected).Select(model => model.PayoutId)
|
|
.ToArray();
|
|
}
|
|
}
|
|
}
|