38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
<%= render HeaderComponent.new(title: "Invitations") %>
|
|
|
|
<%= render MainSimpleComponent.new do %>
|
|
<section>
|
|
<p>
|
|
There are currently <strong><%= @invitations_unused_count %>
|
|
unused invitations</strong> available to existing users.
|
|
<strong><%= @users_with_referrals_count %> users</strong> have successfully
|
|
invited new users.
|
|
</p>
|
|
</section>
|
|
<% if @invitations_used.any? %>
|
|
<section>
|
|
<h3>Accepted (<%= @invitations_used.length %>)</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Token</th>
|
|
<th>Accepted</th>
|
|
<th>Inviter</th>
|
|
<th>Invited user</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @invitations_used.each do |invitation| %>
|
|
<tr>
|
|
<td class="overflow-ellipsis font-mono"><%= invitation.token %></td>
|
|
<td><%= invitation.used_at.strftime("%Y-%m-%d (%H:%M UTC)") %></td>
|
|
<td><%= invitation.user.address %></td>
|
|
<td><%= User.find(invitation.invited_user_id).address %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<% end %>
|
|
<% end %>
|