diff --git a/app/views/payments/index.html.erb b/app/views/payments/index.html.erb index 76596d4c54..3227c2ccb2 100644 --- a/app/views/payments/index.html.erb +++ b/app/views/payments/index.html.erb @@ -1,7 +1,7 @@
| <%= payment.type.underscore.titleize.gsub(" Payment", "").gsub("External Processor", "Stripe") %> | <%= payment.payer.name %> | <%= dollars_from_cents(payment.amount_cents) %> | -<%= dollars_from_cents(payment.amount_cents_remaining) %> | +"><%= dollars_from_cents(payment.amount_cents_remaining) %> | <%= payment.created_at.strftime("%B %d, %Y at %I:%M %p") %> | <%= link_to "View", payment_path(payment), class: "text-primary hover:text-primary-dark", data: { turbo_frame: "_top"} %> |
There are no payments that match your search. Please try again.
+There are no payments that match your search. Please try again.
+Removing an allocation returns its amount to this payment's unallocated balance.
| Allocated To | +Allocated to | Amount | -Date/Time | +Date/time | Actions |
|---|---|---|---|---|---|
| - <%= link_to allocations_path(allocatable_sgid: allocation.allocatable.to_sgid.to_s) do %> - <% if allocation.allocatable_type == "EventRegistration" && allocation.allocatable.present? %> - <%= allocation.allocatable.registrant.full_name %> - — - <%= allocation.allocatable.event.title %> - <% else %> - <%= allocation.allocatable_type.underscore.titleize %> + |
+
+ <%= link_to allocations_path(allocatable_sgid: allocation.allocatable.to_sgid.to_s), class: "#{'line-through' if is_removed}" do %>
+ <% if allocation.allocatable_type == "EventRegistration" && allocation.allocatable.present? %>
+ <%= allocation.allocatable.registrant.full_name %>
+ —
+ <%= allocation.allocatable.event.title %>
+ <% else %>
+ <%= allocation.allocatable_type.underscore.humanize %>
+ <% end %>
<% end %>
- <% end %>
+ <% if is_reversal %>
+ Reversal
+ <% elsif is_removed %>
+ Removed
+ <% end %>
+
|
- <%= dollars_from_cents(allocation.amount) %> | +<%= dollars_from_cents(allocation.amount) %> | <%= allocation.created_at.strftime("%B %d, %Y at %I:%M %p") %> | - <% unless allocation.reverted? || allocation.amount.to_i < 0 %> - <%= button_to "revert", revert_allocation_path(allocation), method: :post, class: "cursor-pointer text-danger hover:text-danger-dark", data: { turbo_confirm: "are you sure you want to revert this allocation?" } %> + <% unless is_removed || is_reversal %> + <%= button_to revert_allocation_path(allocation), method: :post, class: "inline-flex items-center gap-1.5 cursor-pointer text-danger hover:text-danger-dark", data: { turbo_confirm: "Remove this allocation? The #{dollars_from_cents(allocation.amount)} will be returned to this payment's unallocated balance." } do %> + Remove + <% end %> <% end %> | Recipient | Method | Amount | -Date/Time | +Date/time |