akkounts/app/views/admin/donations/show.html.erb
Râu Cao 095747e89b
All checks were successful
continuous-integration/drone/push Build is passing
Fix broken admin links
2024-03-13 18:19:25 +01:00

42 lines
1.3 KiB
Plaintext

<%= render HeaderComponent.new(title: "Donation ##{@donation.id}") %>
<%= render MainSimpleComponent.new do %>
<section>
<table class="w-1/2 divided">
<tbody>
<tr>
<th>User</th>
<td><%= link_to @donation.user.cn, admin_user_path(@donation.user.cn), class: 'ks-text-link' %></td>
</tr>
<tr>
<th>Donation Method</th>
<td><%= @donation.donation_method %></td>
</tr>
<tr>
<th>Amount sats</th>
<td><%= @donation.amount_sats %></td>
</tr>
<tr>
<th>Fiat amount</th>
<td><% if @donation.fiat_amount.present? %><%= number_to_currency @donation.fiat_amount.to_f / 100, unit: "" %> <%= @donation.fiat_currency %><% end %></td>
</tr>
<tr>
<th>Public name</th>
<td><%= @donation.public_name %></td>
</tr>
<tr>
<th>Date</th>
<td><%= @donation.paid_at&.strftime("%Y-%m-%d (%H:%M UTC)") %></td>
</tr>
</tbody>
</table>
</section>
<section>
<p class="pt-6 border-t border-gray-200 text-right">
<%= link_to 'Back', admin_donations_path, class: 'btn-md btn-gray' %>
<%= link_to 'Edit', edit_admin_donation_path(@donation), class: 'ml-2 btn-md btn-blue mr-1' %>
</p>
</section>
<% end %>