<%= render HeaderComponent.new(title: "Donations") %> <%= render MainSimpleComponent.new do %>
<%= render QuickstatsContainerComponent.new do %> <%= render QuickstatsItemComponent.new( type: :number, title: 'Overall', value: @stats[:overall_sats], unit: 'sats' ) %> <%= render QuickstatsItemComponent.new( type: :number, title: 'Donors', value: @stats[:donor_count], meta: "/ #{User.count} users" ) %> <% end %>
<% if @donations.any? %>

Recent Donations

<% @donations.each do |donation| %> <% end %>
User Amount BTC in EUR in USD Public name Date
<%= link_to donation.user.address, admin_user_path(donation.user.address), class: 'ks-text-link' %> <%= sats_to_btc donation.amount_sats %> <% if donation.amount_eur.present? %><%= number_to_currency donation.amount_eur / 100, unit: "" %><% end %> <% if donation.amount_usd.present? %><%= number_to_currency donation.amount_usd / 100, unit: "" %><% end %> <%= donation.public_name %> <%= donation.paid_at ? donation.paid_at.strftime("%Y-%m-%d (%H:%M UTC)") : "" %> <%= link_to 'Show', admin_donation_path(donation), class: 'btn btn-sm btn-gray' %> <%= link_to 'Edit', edit_admin_donation_path(donation), class: 'btn btn-sm btn-gray' %> <%= link_to 'Destroy', admin_donation_path(donation), class: 'btn btn-sm btn-red', data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } %>
<%== pagy_nav @pagy %> <% else %>

No donations yet.

<% end %>

<%= link_to 'Record an out-of-system donation', new_admin_donation_path, class: 'btn-md btn-gray' %>

<% end %>