From 195ca2e2bb45218ce52d970cd352a0487db26080 Mon Sep 17 00:00:00 2001 From: nns <278048682+nurdotnet@users.noreply.github.com> Date: Fri, 24 Apr 2026 19:02:39 +0500 Subject: [PATCH] =?UTF-8?q?ui:=20barcode=20=D1=80=D0=B5=D0=B3=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D1=8F=20/=20h-10=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=8F=20/=20=D0=BF=D1=80=D1=8B=D0=B6=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=83?= =?UTF-8?q?=20/=20min-max=20=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - lib/barcode.ts: новая утилита generateBarcode(type) — валидные коды под все форматы (EAN-13 с префиксом 2, EAN-8 с checksum, UPC-A с checksum, UPC-E 8 цифр, Code128/Code39 12 буквенно-цифровых). - ProductEditPage: при смене типа штрихкода в dropdown поле кода регенерируется под новый формат. - Field.tsx: единая высота h-10 и leading-none для TextInput/Select чтобы Страна/Валюта/НДС в настройках были одного размера. TextArea оставлен с h-auto для multiline. - Pagination.tsx: рядом с ← → добавлен input «Страница [N] из M» для прыжка на произвольную страницу (Enter / blur применяют). - ProductEditPage: блок мин/макс остатков теперь показывается только при org.showMinMaxStock (сама настройка добавится следующим коммитом). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/food-market.web/src/components/Field.tsx | 5 +- .../src/components/Pagination.tsx | 29 +++++++- src/food-market.web/src/lib/barcode.ts | 74 ++++++++++++++++--- .../src/pages/ProductEditPage.tsx | 29 +++++--- 4 files changed, 111 insertions(+), 26 deletions(-) diff --git a/src/food-market.web/src/components/Field.tsx b/src/food-market.web/src/components/Field.tsx index 0111c4e..509a06f 100644 --- a/src/food-market.web/src/components/Field.tsx +++ b/src/food-market.web/src/components/Field.tsx @@ -18,14 +18,15 @@ export function Field({ label, error, children, className }: FieldProps) { ) } -const inputClass = 'w-full rounded-md border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--color-brand)] disabled:opacity-60' +const inputClass = 'w-full h-10 rounded-md border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 px-3 text-sm leading-none focus:outline-none focus:ring-2 focus:ring-[var(--color-brand)] disabled:opacity-60 disabled:bg-slate-50 dark:disabled:bg-slate-800/60' export function TextInput(props: InputHTMLAttributes) { return } export function TextArea(props: TextareaHTMLAttributes) { - return