mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Ensure capture shortcut button shows for the correct payment
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
-# copied from backend/app/views/spree/admin/payments/_list.html.erb
|
||||
|
||||
- # Get the payment in 'checkout' state if any, and show capture button
|
||||
- if order.payments.present?
|
||||
- order.payments.last.actions.grep(/^capture$/).each do |action|
|
||||
= link_to_with_icon "icon-#{action}", t(action), fire_admin_order_payment_path(order, order.payments.last, :e => action), :method => :put, :no_text => true, :data => {:action => action}
|
||||
- payment = order.payments.select{|p| p if p.state == 'checkout'}.first
|
||||
- if !payment.nil?
|
||||
- payment.actions.grep(/^capture$/).each do |action|
|
||||
- # copied from backend/app/views/spree/admin/payments/_list.html.erb
|
||||
= link_to_with_icon "icon-#{action}", t(action), fire_admin_order_payment_path(order, payment, :e => action), :method => :put, :no_text => true, :data => {:action => action}
|
||||
|
||||
0
libpeerconnection.log
Normal file
0
libpeerconnection.log
Normal file
Reference in New Issue
Block a user