user upgrades: add ability to refund upgrades.

This commit is contained in:
evazion
2020-12-29 03:50:43 -06:00
parent 87af02f689
commit 4b171bf97e
8 changed files with 111 additions and 10 deletions

View File

@@ -40,6 +40,9 @@
<% if policy(user_upgrade).payment? %>
| <%= link_to "Payment", payment_user_upgrade_path(user_upgrade), target: "_blank" %>
<% end %>
<% if policy(user_upgrade).refund? %>
| <%= link_to "Refund", refund_user_upgrade_path(user_upgrade), remote: true, method: :put, "data-confirm": "Are you sure you want to refund this payment?" %>
<% end %>
<% end %>
<% end %>

View File

@@ -0,0 +1 @@
location.reload();