akkounts/app/views/admin/donations/index.html.erb
Râu Cao c99d8545c1
All checks were successful
continuous-integration/drone/push Build is passing
Add username filter to admin invitations index
2025-05-28 12:34:52 +04:00

52 lines
1.3 KiB
Plaintext

<%= render HeaderComponent.new(title: "Donations") %>
<%= render MainSimpleComponent.new do %>
<section>
<%= render QuickstatsContainerComponent.new do %>
<%= render QuickstatsItemComponent.new(
type: :number,
title: 'Received',
value: @stats[:overall_sats],
unit: 'sats'
) %>
<%= render QuickstatsItemComponent.new(
type: :number,
title: 'Donors',
value: @stats[:donor_count],
meta: "/ #{User.count} users"
) %>
<% end %>
</section>
<section>
<%= render partial: "admin/username_search_form",
locals: { path: admin_donations_path } %>
</section>
<% if @pending_donations.present? %>
<section>
<h3>Pending</h3>
<%= render partial: "admin/donations/list", locals: {
donations: @pending_donations
} %>
</section>
<% end %>
<section>
<% if @donations.present? %>
<h3>Received</h3>
<%= render partial: "admin/donations/list", locals: {
donations: @donations, pagy: @pagy
} %>
<% else %>
<p>
No donations received yet.
</p>
<% end %>
</section>
<p class="mt-12">
<%= link_to 'Record an out-of-system donation', new_admin_donation_path, class: 'btn-md btn-gray' %>
</p>
<% end %>