From 17c4841acf11c5244d66696462f9a91feb1d8608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 15 Jun 2026 07:09:32 +0400 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=D0=BE=D1=87=D0=B5=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=E2=80=94=20JS?= =?UTF-8?q?=20=D1=81=D0=BB=D0=BE=D0=B9,=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D0=B0=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE?= =?UTF-8?q?=20=D0=BF=D0=BE=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Файлы добавляются в очередь при выборе (чистый JS, без сервера) - Кнопка «Обработать» активна только когда есть файлы - Скрытая форма отправляется ТОЛЬКО по нажатию кнопки - Никакой авто-отправки, никакого LLM до нажатия --- site/templates/upload.html | 106 +++++++++++++++++++++++++++++++++---- 1 file changed, 96 insertions(+), 10 deletions(-) diff --git a/site/templates/upload.html b/site/templates/upload.html index 952b187..e4f22ad 100644 --- a/site/templates/upload.html +++ b/site/templates/upload.html @@ -43,7 +43,8 @@ } .btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; } .btn-primary:hover { background: var(--brand-primary-dark); } - .queue { margin-top: 12px; } + .btn:disabled { opacity: .5; cursor: not-allowed; } + .queue { margin: 12px 0; } .queue-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--brand-gray); @@ -53,6 +54,7 @@ .queue-item .size { color: var(--muted); font-size: 12px; } .queue-item .remove { cursor: pointer; color: var(--muted); padding: 4px; } .queue-item .remove:hover { color: var(--destructive); } + .queue-empty { color: var(--muted); padding: 12px; text-align: center; font-size: 14px; } .table-wrap { border-radius: 6px; border: 1px solid var(--brand-gray); overflow: hidden; margin-top: 12px; } table { width: 100%; border-collapse: collapse; font-size: 13px; } th { background: var(--brand-grey-light); text-transform: uppercase; padding: 4px 8px; border-right: 1px solid var(--brand-gray); text-align: left; font-weight: 600; } @@ -71,34 +73,46 @@
+
Загрузка договоров / допников
-
- - + + +
+ + + + + +
+
Нет файлов — выберите file.docx / file.pdf / file.zip
+ + + {% if error %}
❌ {{ error }}
{% endif %}
+ {% if results %}
- Результаты (строк извлечено: {{ total_rows }}) + Результаты — строк извлечено: {{ total_rows }}
{% for r in results %}
- {{ '✅' if r.ok else '❌' }} {{ 'OK' if r.ok else 'Ошибка' }} + {{ '✅ OK' if r.ok else '❌ Ошибка' }} {{ r.name }} {% if r.ok %} строк: {{ r.rows }}, +{{ r.summary.added }} ~{{ r.summary.changed }} -{{ r.summary.deleted }} @@ -109,7 +123,7 @@ {% endfor %} {% if all_rows %} -
+
@@ -131,6 +145,78 @@ {% endif %} - + +
УслугаЦена, рубКол-воСумма, рубДата