55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
<%= render HeaderComponent.new(title: "Invitations") %>
|
|
|
|
<%= render MainSimpleComponent.new do %>
|
|
<section>
|
|
<% if @invitations_unused.any? %>
|
|
<p>
|
|
Invite your friends to a Kosmos account by sharing an invitation URL with them:
|
|
</p>
|
|
<table class="mt-12">
|
|
<thead>
|
|
<tr>
|
|
<th>URL</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @invitations_unused.each do |invitation| %>
|
|
<tr>
|
|
<td class="font-mono"><%= invitation_url(invitation.token) %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<p>
|
|
You do not have any invitations to give away yet. We will notify you,
|
|
as soon as you can invite others.
|
|
</p>
|
|
<% end %>
|
|
</section>
|
|
|
|
<% if @invitations_used.any? %>
|
|
<section>
|
|
<h3>Accepted Invitations</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="hidden md:block">ID</th>
|
|
<th>Accepted</th>
|
|
<th>Invited user</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @invitations_used.each do |invitation| %>
|
|
<tr>
|
|
<td class="hidden md:block font-mono"><%= 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>
|
|
</section>
|
|
<% end %>
|
|
<% end %>
|