user upgrades: add links to Stripe payment & receipt page.

Add links to the Stripe payment page and the Stripe receipt page on
completed user upgrades.

The Stripe payment link is a link to the payment details on the Stripe
dashboard and is only visible to the owner.
This commit is contained in:
evazion
2020-12-28 22:25:09 -06:00
parent e29e2da8be
commit 87af02f689
8 changed files with 154 additions and 6 deletions

View File

@@ -28,8 +28,18 @@
<% t.column :status %>
<% t.column "Updated" do |artist| %>
<%= time_ago_in_words_tagged(artist.updated_at) %>
<% t.column "Updated" do |user_upgrade| %>
<%= time_ago_in_words_tagged(user_upgrade.updated_at) %>
<% end %>
<% t.column column: "control" do |user_upgrade| %>
<%= link_to "Show", user_upgrade %>
<% if policy(user_upgrade).receipt? %>
| <%= link_to "Receipt", receipt_user_upgrade_path(user_upgrade), target: "_blank" %>
<% end %>
<% if policy(user_upgrade).payment? %>
| <%= link_to "Payment", payment_user_upgrade_path(user_upgrade), target: "_blank" %>
<% end %>
<% end %>
<% end %>