feat: implement core backend API structure and frontend service layer for case management and authentication

This commit is contained in:
2026-05-12 15:41:57 +03:00
parent ee39a3d83b
commit bd73f18d5c
13 changed files with 718 additions and 63 deletions

View File

@@ -9,17 +9,92 @@
</head>
<body>
<header class="header">
<h1>AutoMarket</h1>
<p>Управление жалобами и интеграциями для 10 маркетплейсов</p>
<div style="display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto;">
<div>
<h1>AutoMarket</h1>
<p>Управление жалобами и интеграциями для 10 маркетплейсов</p>
</div>
<div id="user-info" class="hidden">
<span id="username-display" style="margin-right: 1rem;"></span>
<button id="logout-btn" class="btn-secondary">Выйти</button>
</div>
</div>
</header>
<div class="tabs-container">
<button class="tab-btn active" data-target="cases-section">Список жалоб</button>
<button class="tab-btn" data-target="integrations-section">Настройки интеграций</button>
</div>
<!-- AUTH SECTION -->
<main id="auth-section" class="container">
<div class="auth-box">
<h2 id="auth-title">Вход в систему</h2>
<form id="auth-form">
<input type="text" id="auth-username" placeholder="Логин" required />
<input type="password" id="auth-password" placeholder="Пароль" required />
<button type="submit" class="btn-primary" style="width: 100%; margin-top: 1rem;">Войти</button>
</form>
<p style="margin-top: 1rem; text-align: center;">
<a href="#" id="auth-toggle">Нет аккаунта? Зарегистрироваться</a>
</p>
</div>
</main>
<main class="container">
<div id="main-app" class="hidden">
<div class="tabs-container">
<button class="tab-btn active" data-target="dashboard-section">Дашборд</button>
<button class="tab-btn" data-target="cases-section">Список жалоб</button>
<button class="tab-btn" data-target="integrations-section">Настройки интеграций</button>
<button class="tab-btn" data-target="billing-section">Тарифы</button>
</div>
<main class="container">
<!-- Dashboard Section -->
<section id="dashboard-section" class="section">
<h2>Сводная статистика</h2>
<div id="stats-grid" class="platforms-grid">
<!-- Stats cards will be here -->
</div>
<div class="section" style="margin-top: 2rem;">
<h3>Последняя активность</h3>
<table id="recent-activity-table" class="table">
<thead>
<tr>
<th>ID</th>
<th>Площадка</th>
<th>Артикул</th>
<th>Статус</th>
<th>Дата</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</section>
<!-- Billing / Subscription Section -->
<section id="billing-section" class="section hidden">
<h2>Ваш тариф: <span id="current-plan-display">Free</span></h2>
<div class="platforms-grid">
<div class="platform-card">
<h3>Тариф FREE</h3>
<p class="status">Активен по умолчанию</p>
<ul>
<li>Подключение: Максимум 1 маркетплейс</li>
<li>Базовая поддержка</li>
</ul>
<button class="btn-secondary" disabled style="margin-top:1rem; width:100%;">Уже активирован</button>
</div>
<div class="platform-card" style="border-color: var(--color-primary);">
<h3 style="color: var(--color-primary);">Тариф PRO</h3>
<p class="status" style="color: var(--color-primary);">Рекомендуемый</p>
<ul>
<li>Подключение: До 10 маркетплейсов</li>
<li>Безлимитное создание жалоб</li>
<li>Приоритетная поддержка</li>
</ul>
<button id="upgrade-btn" class="btn-primary" style="margin-top:1rem; width:100%;">Купить за 990₽</button>
</div>
</div>
</section>
<!-- Integrations List -->
<section id="integrations-section" class="section hidden">
<h2>Доступные маркетплейсы</h2>
@@ -54,6 +129,7 @@
<option value="closed">Закрыт</option>
</select>
<button id="new-case-btn" class="btn-primary">+ Новый кейс</button>
<button id="export-csv-btn" class="btn-secondary">⬇ Экспорт CSV</button>
</div>
<table id="cases-table" class="table">
<thead>
@@ -119,11 +195,15 @@
<!-- Case detail -->
<section id="case-detail-section" class="section hidden">
<h2>Детали кейса</h2>
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;">
<h2>Детали кейса</h2>
<button id="download-pdf-btn" class="btn-primary">📄 Скачать PDF-претензию</button>
</div>
<div id="case-detail"></div>
<button id="back-to-list" class="btn-secondary">← Назад к списку</button>
</section>
</main>
</main>
</div>
<script type="module" src="js/app.js"></script>
</body>