@using BTCPayServer.Client.Models @model PayoutsModel @inject IEnumerable PayoutHandlers; @{ Layout = "../Shared/_NavLayout.cshtml"; ViewData.SetActivePageAndTitle(WalletsNavPages.Payouts, "Manage payouts", Context.GetStoreData().StoreName); } @section PageFootContent { }

@ViewData["Title"]

@if (!Model.PayoutStateSets.Any()) {

There are no payouts yet.

}
@for (var index = 0; index < Model.PayoutStateSets.Count; index++) { var state = Model.PayoutStateSets[index]; var stateActions = new List<(string Action, string Text)>(); switch (state.State) { case PayoutState.AwaitingApproval: stateActions.Add(("approve", "Approve selected payouts")); stateActions.Add(("approve-pay", "Approve & Send selected payouts")); stateActions.Add(("cancel", "Cancel selected payouts")); break; case PayoutState.AwaitingPayment: stateActions.Add(("pay", "Send selected payouts")); stateActions.Add(("cancel", "Cancel selected payouts")); break; }
@if (state.Payouts.Any() && stateActions.Any()) { }
@if (state.Payouts.Any()) { @if (state.State != PayoutState.AwaitingApproval) { } @for (int i = 0; i < state.Payouts.Count; i++) { var pp = state.Payouts[i]; @if (state.State != PayoutState.AwaitingApproval) { } }
Date Source Destination AmountTransaction
@pp.Date.ToBrowserDate() @pp.PullPaymentName @pp.Destination @pp.Amount @if (!(pp.TransactionLink is null)) { Link }
} else {

No payouts.

}
}