69dfd2a93a
Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
<%- include('../partials/layout-start') %>
|
|
|
|
<div class="admin-header">
|
|
<h1>Пользователи</h1>
|
|
<%- include('../partials/admin-nav', { adminNav: 'users' }) %>
|
|
</div>
|
|
|
|
<p class="muted admin-hint">
|
|
Один администратор — зарегистрированный пользователь с email из <code>ADMIN_EMAIL</code> в <code>.env</code>.
|
|
Остальные при регистрации получают роль «Клиент».
|
|
</p>
|
|
|
|
<table class="cart-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Имя</th>
|
|
<th>Email</th>
|
|
<th>Роль</th>
|
|
<th>Регистрация</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% users.forEach(u => { %>
|
|
<tr>
|
|
<td><%= u.id %></td>
|
|
<td><%= u.name %></td>
|
|
<td><%= u.email %></td>
|
|
<td>
|
|
<span class="role-badge role-badge--<%= u.role %>"><%= roleLabels[u.role] || u.role %></span>
|
|
</td>
|
|
<td><%= new Date(u.created_at).toLocaleString('ru-RU') %></td>
|
|
</tr>
|
|
<% }) %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%- include('../partials/layout-end') %>
|