Личный кабинет
<% if (success) { %>
<%= success %>
<% } %>
<% if (error) { %>
<%= error %>
<% } %>
<% if (activeTab === 'profile') { %>
Мой профиль
- ID
- <%= user.id %>
- Email
- <%= user.email %>
- Роль
- <%= roleLabels[user.role] || user.role %>
- Регистрация
- <%= new Date(user.created_at).toLocaleString('ru-RU') %>
- Заказов
- <%= orderCount %>
Мои заказы
<% } %>
<% if (activeTab === 'email') { %>
Смена email
Текущий email: <%= user.email %>
<% } %>
<% if (activeTab === 'reservations') { %>
Мои бронирования
<% if (!reservations.length) { %>
Активных броней нет.
<% } else { %>
| Товар |
Кол-во |
Статус |
До |
|
<% const resStatus = { active: 'Активна', fulfilled: 'Выполнена', cancelled: 'Отменена', expired: 'Истекла' }; %>
<% reservations.forEach(r => { %>
| <%= r.product_name %> |
<%= r.quantity %> |
<%= resStatus[r.status] || r.status %> |
<%= r.status === 'active' ? new Date(r.expires_at).toLocaleString('ru-RU') : '—' %> |
<% if (r.status === 'active') { %>
<% } %>
|
<% }) %>
<% } %>
<% } %>
<% if (activeTab === 'password') { %>
<% } %>
<%- include('../partials/layout-end') %>