fns-receipt-service/public/index.html
romantarkin 87f6f35572 fix
2026-06-08 14:58:11 +05:00

122 lines
4.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>FNS Receipt Service</title>
<link rel="stylesheet" href="/admin/styles.css">
</head>
<body>
<header class="topbar">
<div>
<h1>FNS Receipt Service</h1>
<p id="subtitle">Админ-панель чеков и настроек</p>
</div>
<form id="login-form" class="login">
<input id="admin-password" type="password" autocomplete="current-password" placeholder="API_PASS">
<button type="submit">Войти</button>
</form>
<div id="session-actions" class="session-actions hidden">
<span id="session-status">Подключено</span>
<button id="logout-button" type="button">Выйти</button>
</div>
</header>
<nav class="tabs" aria-label="Разделы">
<button class="tab active" type="button" data-view="receipts">Чеки</button>
<button class="tab" type="button" data-view="create">Создать чек</button>
<button class="tab" type="button" data-view="settings">Настройки</button>
<button class="tab" type="button" data-view="health">Диагностика</button>
</nav>
<main>
<section id="view-receipts" class="view active">
<div class="toolbar">
<div class="search">
<input id="receipt-search" type="search" placeholder="Поиск по email, ID чека или позиции">
</div>
<button id="reload-receipts" type="button">Обновить</button>
<button id="sync-fns" type="button">Синхронизировать с ФНС</button>
</div>
<div class="metrics">
<div><span id="metric-count">0</span><small>чеков</small></div>
<div><span id="metric-total">0.00</span><small>рублей</small></div>
<div><span id="metric-errors">0</span><small>ошибок</small></div>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Дата</th>
<th>Пользователь</th>
<th>Чек</th>
<th>Сумма</th>
<th>Письмо</th>
<th>Источник</th>
<th></th>
</tr>
</thead>
<tbody id="receipts-body"></tbody>
</table>
</div>
</section>
<section id="view-create" class="view">
<form id="create-form" class="panel form-grid">
<label>
Email пользователя
<input name="email" type="email" required placeholder="client@example.com">
</label>
<div class="items-head">
<strong>Позиции</strong>
<button id="add-item" type="button">Добавить позицию</button>
</div>
<div id="items-list" class="items-list"></div>
<div class="form-footer">
<span>Итого: <strong id="create-total">0.00</strong></span>
<button type="submit">Создать чек</button>
</div>
</form>
</section>
<section id="view-settings" class="view">
<form id="settings-form" class="panel">
<div class="settings-head">
<div>
<h2>Параметры сервиса</h2>
<p>Пустое секретное поле оставляет текущее значение без изменений.</p>
</div>
<button type="submit">Сохранить</button>
</div>
<div id="settings-list" class="settings-list"></div>
</form>
</section>
<section id="view-health" class="view">
<div class="toolbar">
<button id="check-health" type="button">Проверить сервис</button>
<button id="check-smtp" type="button">Проверить SMTP</button>
<button id="check-fns-user" type="button">Профиль ФНС</button>
</div>
<pre id="health-output" class="output">Нет данных</pre>
</section>
</main>
<div id="toast" class="toast hidden" role="status" aria-live="polite"></div>
<template id="item-row-template">
<div class="item-row">
<input name="id" placeholder="ID заказа">
<input name="name" placeholder="Название" required>
<input name="price" type="number" min="0" step="0.01" placeholder="Цена" required>
<input name="quantity" type="number" min="1" step="1" value="1" placeholder="Кол-во">
<button type="button" class="remove-item" aria-label="Удалить позицию">x</button>
</div>
</template>
<script src="/admin/app.js"></script>
</body>
</html>