feat: Evotor user lifecycle, RBAC, admin panel
- Receive Evotor webhooks: POST /user/create, /user/verify, /user/token
- Create users in pending status; match to existing users by email/phone
- Send invite link via Celery notification task; user sets password at /invite
- Abstract EmailProvider/SMSProvider with ConsoleEmailProvider default
- Role-based access control: role enum on users + roles/permissions tables
- Admin panel: /admin/users (list, filter, search, paginate), user detail card
with activate/suspend/reset-password/send-invite/edit/delete actions
- Admin roles management: /admin/roles with per-role permission assignment
- Extend user profile card: role, status, Evotor ID, email confirmation badge
- Auth routes: register, login, logout, confirm-email, forgot/reset password
- Alembic migrations 0002 (full schema + new fields) and 0003 (RBAC + seeds)
- Port Pico CSS + Bootstrap Icons UI from Node.js commit (854c912)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:01:25 +03:00
|
|
|
|
{% extends "base.html" %}
|
feat: apply new Мои Товары design system across all templates
Replace Pico CSS with custom design: dark sidebar layout, Golos Text +
JetBrains Mono fonts, orange accent (#FF5500), new component classes
(cards, tables, buttons, tags, toggles, alerts, tabs, login split-panel).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 12:43:08 +03:00
|
|
|
|
{% block title %}Профиль — Мои Товары{% endblock %}
|
|
|
|
|
|
{% block page_title %}Профиль{% endblock %}
|
feat: Evotor user lifecycle, RBAC, admin panel
- Receive Evotor webhooks: POST /user/create, /user/verify, /user/token
- Create users in pending status; match to existing users by email/phone
- Send invite link via Celery notification task; user sets password at /invite
- Abstract EmailProvider/SMSProvider with ConsoleEmailProvider default
- Role-based access control: role enum on users + roles/permissions tables
- Admin panel: /admin/users (list, filter, search, paginate), user detail card
with activate/suspend/reset-password/send-invite/edit/delete actions
- Admin roles management: /admin/roles with per-role permission assignment
- Extend user profile card: role, status, Evotor ID, email confirmation badge
- Auth routes: register, login, logout, confirm-email, forgot/reset password
- Alembic migrations 0002 (full schema + new fields) and 0003 (RBAC + seeds)
- Port Pico CSS + Bootstrap Icons UI from Node.js commit (854c912)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:01:25 +03:00
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
feat: apply new Мои Товары design system across all templates
Replace Pico CSS with custom design: dark sidebar layout, Golos Text +
JetBrains Mono fonts, orange accent (#FF5500), new component classes
(cards, tables, buttons, tags, toggles, alerts, tabs, login split-panel).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 12:43:08 +03:00
|
|
|
|
<div class="pg-title">Личный кабинет</div>
|
|
|
|
|
|
<div class="pg-sub">Ваши данные и настройки аккаунта</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="g2" style="align-items:start;">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
|
|
<div class="card-hd">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<div class="card-title">Данные профиля</div>
|
|
|
|
|
|
<div class="card-sub">Основная информация об аккаунте</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="avatar {% if user.role in ('admin','system') %}admin{% endif %}" style="width:44px;height:44px;font-size:15px;">
|
|
|
|
|
|
{{ user.first_name[0] if user.first_name else '?' }}{{ user.last_name[0] if user.last_name else '' }}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="conn-detail">
|
|
|
|
|
|
<div class="conn-row">
|
|
|
|
|
|
<span class="conn-k">Имя</span>
|
|
|
|
|
|
<span class="conn-v" style="font-family:'Golos Text',sans-serif;">{{ user.first_name }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="conn-row">
|
|
|
|
|
|
<span class="conn-k">Фамилия</span>
|
|
|
|
|
|
<span class="conn-v" style="font-family:'Golos Text',sans-serif;">{{ user.last_name }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="conn-row">
|
|
|
|
|
|
<span class="conn-k">Email</span>
|
|
|
|
|
|
<span class="conn-v" style="display:flex;align-items:center;gap:6px;">
|
|
|
|
|
|
{{ user.email }}
|
|
|
|
|
|
{% if user.is_email_confirmed %}
|
|
|
|
|
|
<span class="tag tag-gr" style="font-size:10px;padding:1px 6px;"><i class="bi bi-check-circle"></i> подтверждён</span>
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
<span class="tag tag-yl" style="font-size:10px;padding:1px 6px;"><i class="bi bi-exclamation-circle"></i> не подтверждён</span>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="conn-row">
|
|
|
|
|
|
<span class="conn-k">Телефон</span>
|
|
|
|
|
|
<span class="conn-v">{{ user.phone or '—' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="conn-row">
|
|
|
|
|
|
<span class="conn-k">Роль</span>
|
|
|
|
|
|
<span class="conn-v" style="font-family:'Golos Text',sans-serif;">
|
|
|
|
|
|
{% if user.role == 'system' %}
|
|
|
|
|
|
<span class="tag tag-rd">Системный</span>
|
|
|
|
|
|
{% elif user.role == 'admin' %}
|
|
|
|
|
|
<span class="tag tag-or">Администратор</span>
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
<span class="tag tag-dim">Пользователь</span>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="conn-row">
|
|
|
|
|
|
<span class="conn-k">Статус</span>
|
|
|
|
|
|
<span class="conn-v" style="font-family:'Golos Text',sans-serif;">
|
|
|
|
|
|
{% if user.status == 'active' %}
|
|
|
|
|
|
<span class="tag tag-gr"><span class="dot g"></span>Активен</span>
|
|
|
|
|
|
{% elif user.status == 'pending' %}
|
|
|
|
|
|
<span class="tag tag-yl"><span class="dot y pulse"></span>Ожидает</span>
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
<span class="tag tag-rd"><span class="dot r"></span>Заблокирован</span>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{% if user.evotor_user_id %}
|
|
|
|
|
|
<div class="conn-row">
|
|
|
|
|
|
<span class="conn-k">Эвотор ID</span>
|
|
|
|
|
|
<span class="conn-v">{{ user.evotor_user_id }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
<div class="conn-row">
|
|
|
|
|
|
<span class="conn-k">Регистрация</span>
|
|
|
|
|
|
<span class="conn-v">{{ user.created_at | datefmt }}</span>
|
|
|
|
|
|
</div>
|
feat: Evotor user lifecycle, RBAC, admin panel
- Receive Evotor webhooks: POST /user/create, /user/verify, /user/token
- Create users in pending status; match to existing users by email/phone
- Send invite link via Celery notification task; user sets password at /invite
- Abstract EmailProvider/SMSProvider with ConsoleEmailProvider default
- Role-based access control: role enum on users + roles/permissions tables
- Admin panel: /admin/users (list, filter, search, paginate), user detail card
with activate/suspend/reset-password/send-invite/edit/delete actions
- Admin roles management: /admin/roles with per-role permission assignment
- Extend user profile card: role, status, Evotor ID, email confirmation badge
- Auth routes: register, login, logout, confirm-email, forgot/reset password
- Alembic migrations 0002 (full schema + new fields) and 0003 (RBAC + seeds)
- Port Pico CSS + Bootstrap Icons UI from Node.js commit (854c912)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:01:25 +03:00
|
|
|
|
</div>
|
feat: apply new Мои Товары design system across all templates
Replace Pico CSS with custom design: dark sidebar layout, Golos Text +
JetBrains Mono fonts, orange accent (#FF5500), new component classes
(cards, tables, buttons, tags, toggles, alerts, tabs, login split-panel).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 12:43:08 +03:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="display:flex;flex-direction:column;gap:12px;">
|
|
|
|
|
|
<div class="card">
|
|
|
|
|
|
<div class="card-title" style="margin-bottom:14px;">Действия</div>
|
|
|
|
|
|
<div style="display:flex;flex-direction:column;gap:8px;">
|
|
|
|
|
|
<a href="/profile/edit" class="btn btn-primary">
|
|
|
|
|
|
<i class="bi bi-pencil"></i> Редактировать профиль
|
|
|
|
|
|
</a>
|
|
|
|
|
|
<a href="/profile/change-password" class="btn btn-outline">
|
|
|
|
|
|
<i class="bi bi-key"></i> Изменить пароль
|
|
|
|
|
|
</a>
|
|
|
|
|
|
{% if not user.is_email_confirmed %}
|
|
|
|
|
|
<a href="/resend-confirm" class="btn btn-outline">
|
|
|
|
|
|
<i class="bi bi-envelope"></i> Отправить письмо с подтверждением
|
|
|
|
|
|
</a>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
<a href="/logout" class="btn btn-outline">
|
|
|
|
|
|
<i class="bi bi-box-arrow-right"></i> Выйти
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="card" style="border-color:#F4AEAE;">
|
|
|
|
|
|
<div class="card-title" style="color:#E53935;margin-bottom:10px;"><i class="bi bi-exclamation-triangle" style="margin-right:6px;"></i>Опасная зона</div>
|
|
|
|
|
|
<div class="card-sub" style="margin-bottom:12px;">Необратимые действия с аккаунтом</div>
|
|
|
|
|
|
<a href="/profile/delete" class="btn btn-danger btn-sm">
|
|
|
|
|
|
<i class="bi bi-trash"></i> Удалить аккаунт
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
feat: Evotor user lifecycle, RBAC, admin panel
- Receive Evotor webhooks: POST /user/create, /user/verify, /user/token
- Create users in pending status; match to existing users by email/phone
- Send invite link via Celery notification task; user sets password at /invite
- Abstract EmailProvider/SMSProvider with ConsoleEmailProvider default
- Role-based access control: role enum on users + roles/permissions tables
- Admin panel: /admin/users (list, filter, search, paginate), user detail card
with activate/suspend/reset-password/send-invite/edit/delete actions
- Admin roles management: /admin/roles with per-role permission assignment
- Extend user profile card: role, status, Evotor ID, email confirmation badge
- Auth routes: register, login, logout, confirm-email, forgot/reset password
- Alembic migrations 0002 (full schema + new fields) and 0003 (RBAC + seeds)
- Port Pico CSS + Bootstrap Icons UI from Node.js commit (854c912)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:01:25 +03:00
|
|
|
|
</div>
|
|
|
|
|
|
{% endblock %}
|