242 lines
9.8 KiB
HTML
242 lines
9.8 KiB
HTML
<!doctype html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<meta name="theme-color" content="#16806a" />
|
||
<title>Admin Control Center</title>
|
||
<link rel="manifest" href="/manifest.webmanifest" />
|
||
<link rel="stylesheet" href="/static/styles.css" />
|
||
<script src="https://telegram.org/js/telegram-web-app.js"></script>
|
||
</head>
|
||
<body class="auth-required admin-page">
|
||
<div class="auth-overlay" id="authOverlay">
|
||
<div class="auth-panel">
|
||
<p class="eyebrow">CarPass</p>
|
||
<h1>Админ-панель</h1>
|
||
<p id="authMessage">Откройте страницу через Telegram, чтобы подтвердить права администратора.</p>
|
||
<div class="auth-actions">
|
||
<a id="telegramLoginLink" class="telegram-login-link hidden" href="#" rel="noreferrer">Открыть в Telegram</a>
|
||
<button id="telegramRetryBtn" class="telegram-secondary-btn" type="button">Проверить вход</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<main class="shell admin-shell">
|
||
<header class="topbar">
|
||
<div>
|
||
<p class="eyebrow">CarPass Admin</p>
|
||
<h1>Control Center</h1>
|
||
</div>
|
||
<div class="top-actions">
|
||
<button class="icon-btn" id="refreshBtn" title="Обновить" aria-label="Обновить">↻</button>
|
||
</div>
|
||
</header>
|
||
|
||
<section class="passport-panel admin-hero">
|
||
<div class="passport-head">
|
||
<div>
|
||
<p class="eyebrow">Пилотный контур</p>
|
||
<h2>Операционный обзор</h2>
|
||
<small id="adminMeta">Загружаю доступ и источники данных...</small>
|
||
</div>
|
||
<span class="trust-badge" id="adminRoleBadge">Проверка</span>
|
||
</div>
|
||
</section>
|
||
|
||
<nav class="admin-tabs" aria-label="Разделы админки">
|
||
<button type="button" data-admin-tab="dashboard">Dashboard</button>
|
||
<button type="button" data-admin-tab="notifications">Notifications</button>
|
||
<button type="button" data-admin-tab="users">Users</button>
|
||
<button type="button" data-admin-tab="sto">СТО</button>
|
||
<button type="button" data-admin-tab="sto-applications">Заявки СТО</button>
|
||
<button type="button" data-admin-tab="vehicles">Авто</button>
|
||
<button type="button" data-admin-tab="appointments">Записи</button>
|
||
<button type="button" data-admin-tab="work-orders">Заказ-наряды</button>
|
||
<button type="button" data-admin-tab="data">Data Explorer</button>
|
||
<button type="button" data-admin-tab="audit">Audit Log</button>
|
||
<button type="button" data-admin-tab="exports">Exports</button>
|
||
</nav>
|
||
|
||
<section id="panel-dashboard" class="admin-panel workspace">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Сервис</p>
|
||
<h2>Dashboard</h2>
|
||
</div>
|
||
</div>
|
||
<div class="stats admin-stats" id="dashboardStats"></div>
|
||
<div class="admin-grid">
|
||
<section>
|
||
<h3>Последние события</h3>
|
||
<div id="dashboardAlerts" class="stack-list"></div>
|
||
</section>
|
||
<section>
|
||
<h3>Быстрые переходы</h3>
|
||
<div id="quickLinks" class="admin-link-grid"></div>
|
||
</section>
|
||
</div>
|
||
</section>
|
||
|
||
<section id="panel-notifications" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">События</p>
|
||
<h2>Admin notifications</h2>
|
||
</div>
|
||
<button type="button" id="readAllBtn">Прочитать все</button>
|
||
</div>
|
||
<div id="notificationsList" class="stack-list"></div>
|
||
</section>
|
||
|
||
<section id="panel-users" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Аккаунты</p>
|
||
<h2>Users</h2>
|
||
</div>
|
||
</div>
|
||
<form class="admin-filter" data-list-filter="users">
|
||
<input name="search" placeholder="Поиск по имени или username" />
|
||
<button type="submit">Найти</button>
|
||
</form>
|
||
<div id="usersTable" class="admin-table-wrap"></div>
|
||
</section>
|
||
|
||
<section id="panel-sto" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Партнеры</p>
|
||
<h2>СТО</h2>
|
||
</div>
|
||
</div>
|
||
<form class="admin-filter" data-list-filter="sto">
|
||
<input name="city" placeholder="Город" />
|
||
<select name="status">
|
||
<option value="">Любой статус</option>
|
||
<option value="pending">pending</option>
|
||
<option value="approved">approved</option>
|
||
<option value="needs_changes">needs_changes</option>
|
||
<option value="rejected">rejected</option>
|
||
<option value="suspended">suspended</option>
|
||
</select>
|
||
<button type="submit">Фильтр</button>
|
||
</form>
|
||
<div id="stoTable" class="admin-table-wrap"></div>
|
||
</section>
|
||
|
||
<section id="panel-sto-applications" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Модерация</p>
|
||
<h2>Заявки СТО</h2>
|
||
</div>
|
||
</div>
|
||
<div id="applicationsList" class="stack-list"></div>
|
||
</section>
|
||
|
||
<section id="panel-vehicles" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Гараж</p>
|
||
<h2>Автомобили</h2>
|
||
</div>
|
||
</div>
|
||
<div id="vehiclesTable" class="admin-table-wrap"></div>
|
||
</section>
|
||
|
||
<section id="panel-appointments" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Календарь</p>
|
||
<h2>Записи</h2>
|
||
</div>
|
||
</div>
|
||
<div id="appointmentsTable" class="admin-table-wrap"></div>
|
||
</section>
|
||
|
||
<section id="panel-work-orders" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Работы</p>
|
||
<h2>Заказ-наряды</h2>
|
||
</div>
|
||
</div>
|
||
<div id="workOrdersTable" class="admin-table-wrap"></div>
|
||
</section>
|
||
|
||
<section id="panel-data" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Без SQL</p>
|
||
<h2>Data Explorer</h2>
|
||
</div>
|
||
</div>
|
||
<form id="dataForm" class="grid-form admin-data-form">
|
||
<label>Тип данных<select name="source" id="sourceSelect"></select></label>
|
||
<label>Дата от<input name="date_from" type="date" /></label>
|
||
<label>Дата до<input name="date_to" type="date" /></label>
|
||
<label>Status<input name="status" /></label>
|
||
<label>User ID<input name="user_id" type="number" /></label>
|
||
<label>Telegram ID<input name="telegram_id" type="number" /></label>
|
||
<label>Vehicle ID<input name="vehicle_id" type="number" /></label>
|
||
<label>STO ID<input name="sto_id" type="number" /></label>
|
||
<label>City<input name="city" /></label>
|
||
<label>Role<input name="role" /></label>
|
||
<label>Search<input name="search" /></label>
|
||
<label>Sort
|
||
<select name="sort" id="sortSelect"></select>
|
||
</label>
|
||
<label>Limit
|
||
<select name="limit">
|
||
<option>25</option>
|
||
<option selected>50</option>
|
||
<option>100</option>
|
||
<option>500</option>
|
||
</select>
|
||
</label>
|
||
<label class="check admin-check"><input name="include_sensitive" type="checkbox" /> Show sensitive</label>
|
||
<label>Reason<input name="reason" placeholder="Обязательно для sensitive/export" /></label>
|
||
<div class="admin-form-actions">
|
||
<button type="submit">Запросить</button>
|
||
<button type="button" class="ghost-btn" id="exportJsonBtn">JSON export</button>
|
||
<button type="button" class="ghost-btn" id="exportCsvBtn">CSV export</button>
|
||
</div>
|
||
</form>
|
||
<div id="dataResult" class="admin-table-wrap"></div>
|
||
</section>
|
||
|
||
<section id="panel-audit" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Контроль</p>
|
||
<h2>Audit Log</h2>
|
||
</div>
|
||
</div>
|
||
<form id="auditForm" class="admin-filter">
|
||
<input name="action" placeholder="Action" />
|
||
<input name="actor_id" type="number" placeholder="Actor ID" />
|
||
<input name="entity_type" placeholder="Entity type" />
|
||
<input name="entity_id" placeholder="Entity ID" />
|
||
<button type="submit">Показать</button>
|
||
</form>
|
||
<div id="auditTable" class="admin-table-wrap"></div>
|
||
</section>
|
||
|
||
<section id="panel-exports" class="admin-panel workspace hidden">
|
||
<div class="section-head">
|
||
<div>
|
||
<p class="eyebrow">Выгрузки</p>
|
||
<h2>Exports</h2>
|
||
</div>
|
||
</div>
|
||
<div id="exportsTable" class="admin-table-wrap"></div>
|
||
</section>
|
||
</main>
|
||
|
||
<div class="toast hidden" id="toast" role="status" aria-live="polite"></div>
|
||
<script src="/static/page_common.js"></script>
|
||
<script src="/static/admin.js"></script>
|
||
</body>
|
||
</html>
|