Refactor menu flows into dedicated pages
Some checks failed
ci / test (push) Has been cancelled

This commit is contained in:
VPN SaaS Dev
2026-05-16 11:59:09 +09:00
parent 01a69fc42d
commit ecfb5aa949
20 changed files with 2415 additions and 97 deletions

176
web/sto_settings.html Normal file
View File

@@ -0,0 +1,176 @@
<!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>Настройки СТО</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 flow-page">
<div class="auth-overlay" id="authOverlay">
<div class="auth-panel">
<p class="eyebrow">CarPass Business</p>
<h1>Настройки СТО</h1>
<p>Откройте страницу через 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 flow-shell">
<header class="topbar">
<div>
<p class="eyebrow">СТО</p>
<h1>Параметры сервиса</h1>
</div>
<div class="top-actions">
<a class="ghost-btn" href="/sto.html">Рабочее место</a>
<select id="centerSelect" aria-label="СТО"></select>
</div>
</header>
<section class="flow-hero">
<div>
<p class="eyebrow">Управление</p>
<h2 id="settingsTitle">Выберите СТО</h2>
<small id="settingsHint">График влияет на свободные окна записи, каталог ускоряет создание заказ-нарядов.</small>
</div>
<span class="trust-badge" id="roleBadge">Проверка</span>
</section>
<section class="flow-layout">
<section class="workspace">
<form id="bookingSettingsForm" class="grid-form drawer-form flow-form">
<div class="form-block wide">
<p class="eyebrow">1. График</p>
<h3>Онлайн-запись</h3>
<small>Клиент видит только свободные окна по этому расписанию.</small>
</div>
<label class="wide">
Рабочие дни
<div class="weekday-grid" id="weekdayGrid">
<label><input type="checkbox" name="working_days" value="0" /> Пн</label>
<label><input type="checkbox" name="working_days" value="1" /> Вт</label>
<label><input type="checkbox" name="working_days" value="2" /> Ср</label>
<label><input type="checkbox" name="working_days" value="3" /> Чт</label>
<label><input type="checkbox" name="working_days" value="4" /> Пт</label>
<label><input type="checkbox" name="working_days" value="5" /> Сб</label>
<label><input type="checkbox" name="working_days" value="6" /> Вс</label>
</div>
</label>
<label>
Открытие
<input name="open_time" type="time" />
</label>
<label>
Закрытие
<input name="close_time" type="time" />
</label>
<label>
Обед с
<input name="lunch_break_start" type="time" />
</label>
<label>
Обед до
<input name="lunch_break_end" type="time" />
</label>
<label>
Длительность слота, мин
<input name="slot_duration_minutes" type="number" min="10" max="240" />
</label>
<label>
Буфер между записями, мин
<input name="booking_buffer_minutes" type="number" min="0" max="240" />
</label>
<label>
Параллельных записей
<input name="max_parallel_bookings" type="number" min="1" max="20" />
</label>
<label>
Часовой пояс
<input name="timezone" placeholder="Asia/Seoul" />
</label>
<label class="check wide">
<input name="accepts_online_booking" type="checkbox" />
Принимать онлайн-запись
</label>
<div class="row-actions wide">
<button id="saveScheduleBtn" type="submit">Сохранить график</button>
</div>
</form>
</section>
<section class="workspace">
<form id="catalogForm" class="grid-form drawer-form flow-form">
<div class="form-block wide">
<p class="eyebrow">2. Каталог</p>
<h3>Работы и материалы</h3>
<small>Добавленные позиции будут доступны в заказ-наряде вместе с системным каталогом.</small>
</div>
<label>
Тип
<select name="item_type">
<option value="work">Работа</option>
<option value="product">Материал</option>
</select>
</label>
<label>
Название
<input name="title" placeholder="Замена масла ДВС" required />
</label>
<label>
Категория
<input name="category" placeholder="engine_oil" />
</label>
<label>
Бренд
<input name="brand" placeholder="Hyundai / BMW / Shell" />
</label>
<label>
Артикул
<input name="sku" placeholder="SKU" />
</label>
<label>
Единица
<input name="unit" placeholder="pcs / l / hour" />
</label>
<label>
Количество
<input name="default_quantity" type="number" min="0.01" step="0.01" value="1" />
</label>
<label>
Цена
<input name="default_unit_price" type="number" min="0" step="0.01" value="0" />
</label>
<label>
Вязкость
<input name="viscosity" placeholder="5W-30" />
</label>
<label>
Спецификация
<input name="specification" placeholder="API SP / MB 229.5" />
</label>
<label class="wide">
Описание
<input name="description" placeholder="Комментарий для сотрудников" />
</label>
<div class="row-actions wide">
<button id="saveCatalogBtn" type="submit">Добавить позицию</button>
</div>
</form>
<div class="list-heading">Каталог СТО</div>
<div id="catalogList" class="stack-list"></div>
</section>
</section>
</main>
<div class="toast hidden" id="toast" role="status" aria-live="polite"></div>
<script src="/static/page_common.js"></script>
<script src="/static/sto_settings.js"></script>
</body>
</html>