Add user page to admin panel, improve other admin pages #88

Merged
raucao merged 15 commits from feature/admin_user_details into master 2023-02-26 14:16:41 +00:00
3 changed files with 27 additions and 1 deletions
Showing only changes of commit 55abbcc5ad - Show all commits

View File

@@ -7,10 +7,14 @@
@apply text-left;
}
table th {
table thead th {
@apply pb-3.5 text-sm font-normal uppercase text-gray-500;
}
table tbody th {
@apply text-left font-normal text-gray-500;
}
table th:not(:last-of-type),
table td:not(:last-of-type) {
@apply pr-2;

View File

@@ -14,6 +14,7 @@ class Admin::UsersController < Admin::BaseController
end
def show
@inviter = Invitation.where(invited_user_id: @user.id).first.try(:user)
end
private

View File

@@ -2,5 +2,26 @@
<%= render MainSimpleComponent.new do %>
<section>
<h3>Account</h3>
<table class="w-1/2">
<tbody>
<tr>
<th>Created at</th>
<td><%= @user.created_at.strftime("%Y-%m-%d (%H:%M UTC)") %></td>
</tr>
<tr>
<th>Confirmed at</th>
<td><%= @user.confirmed_at.strftime("%Y-%m-%d (%H:%M UTC)") %></td>
</tr>
<tr>
<th>Email</th>
<td><%= @user.email %></td>
</tr>
<tr>
<th>Invited by</th>
<td><%= @inviter ? link_to(@inviter.address, admin_user_path(@inviter.address), class: 'ks-text-link') : "—" %></td>
</tr>
</tbody>
</table>
</section>
<% end %>