WIP user page

This commit is contained in:
Râu Cao 2023-02-23 23:55:32 +08:00
parent ffed398024
commit 55abbcc5ad
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
3 changed files with 27 additions and 1 deletions

View File

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

View File

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

View File

@ -2,5 +2,26 @@
<%= render MainSimpleComponent.new do %> <%= render MainSimpleComponent.new do %>
<section> <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> </section>
<% end %> <% end %>