New admin page for invitations

This commit is contained in:
2021-02-01 21:53:18 +01:00
parent 4fbfaadb44
commit dc7cf107c2
5 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<section>
<h2>Invitations</h2>
<% if @invitations_used.any? %>
<h3>Accepted (<%= @invitations_used.length %>)</h3>
<table>
<thead>
<tr>
<th>Token</th>
<th>Accepted</th>
<th>Invited user</th>
</tr>
</thead>
<tbody>
<% @invitations_used.each do |invitation| %>
<tr>
<td class="overflow-ellipsis"><%= invitation.token %></td>
<td><%= invitation.used_at.strftime("%Y-%m-%d") %></td>
<td><%= User.find(invitation.invited_user_id).address %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
</section>