Категория лота приходит из прайслиста — запрашивать её из серверной БД
нарушало принцип local-first. Сигнатура NewExportService упрощена,
все call-sites обновлены.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
categoryRepo всегда nil (передаётся null при инициализации), поэтому
categoryOrder был пустым и сортировка по категориям не работала.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SeedCategories теперь обновляет display_order у существующих записей,
поэтому новый порядок применяется при следующем запуске без ручных миграций.
MaxKnownDisplayOrder повышен до 200.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Добавлен парсер собственного CSV-экспорта QuoteForge (IsQuoteForgeCSV /
parseQuoteForgeCSV). Формат: UTF-8 BOM + заголовок Line;Type;p/n;...,
блоки сервер → компоненты. DirectItems создаются напрямую без прохода
через VendorSpecResolver. Модальное окно импорта принимает .csv/.txt/.xml.
Fix кнопки «Обновить цены» на странице варианта: после синхронизации
прайс-листов запрашивается актуальный estimate-прайслист и передаётся
явным pricelist_id в каждый POST /api/configs/:uuid/refresh-prices.
Ранее использовался устаревший ID, сохранённый в конфигурации.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Добавлена кнопка «Обновить цены» в панель действий страницы варианта.
При нажатии синхронизирует прайс-листы с сервером (если онлайн), затем
последовательно вызывает POST /api/configs/:uuid/refresh-prices для каждой
активной конфигурации — тот же механизм, что и кнопка внутри конфигурации.
Цены и итоговая сумма обновляются в таблице без перезагрузки страницы.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Добавлен парсер для текстового формата Inspur (опциональный '|' в начале
строки, разделитель '*' перед количеством). На BOM-вкладке вставка такого
текста автоматически определяется и разбивается на колонки P/N + Qty без
ручного выбора типов. На бэкенде тот же формат поддерживается через
POST /api/projects/:uuid/vendor-import.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Вынести sortConfigsByLine() — устранить дублирование sort.Slice
в ProjectToExportData и ProjectToPricingExportData
- Добавить ConfigToPricingExportData() и ExportConfigPricingCSV handler
- Зарегистрировать POST /api/configs/:uuid/export/pricing
- Заменить клиентский DOM-скрапинг exportPricingCSV() на fetch к новому
endpoint; артикул теперь включается через pricingConfigSummaryRow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
compressArticle assumed a fixed segment layout [model,cpu,mem,gpu,disk,net,psu,support].
Build() skips empty segments, so without GPU the PSU slot shifted to index 5. Step 2 of
compression called compressNetSegment on the PSU value ("2x1kW") which returned "2xNIC".
Replace positional indexing with namedSeg{group,value} tagged segments; compressArticle
now looks up each segment by group name via findSegGroup(), regardless of array length.
Regression test TestBuild_CompressArticle_NoGPU_PSUNotNIC reproduces the exact config
from OPS-2445 (NF5280M6 + 2xPSU, no GPU) that triggered the bug.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Poll /health every 5s; show full-screen overlay after 2 consecutive
failures telling the user the console was closed
- Auto-hide overlay when backend comes back online
- Added to base.html (all main pages) and setup.html (first-run/settings)
- setup.html: suppress false-positive overlay during intentional restart
via awaitingRestart flag
- setup.html: add amber warning banner that the console must stay open
- .gitignore: block *_import.sql and *_export.csv to prevent future
accidental commits of real supplier/pricing data
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Все вкладки (storage, pci, power, accessories, sw, other) теперь
используют редактируемый autocomplete-input для существующих позиций,
как на вкладке base; выбор заменяет позицию с сохранением количества
- LOT-поле в BOM-таблицах переведено на общий autocomplete dropdown
вместо datalist
- Кнопка ✕ в BOM снимает сопоставление вместо удаления строки
- Кнопка «Пересчитать эстимейт» переименована в «Перенести в эстимейт»
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ampere, Hopper, Blackwell now produce AMP/HOP/BWL suffixes (like ADA)
so RTX cards across generations are distinguishable: RTX6000ADA vs
RTX6000BWL. LOVELACE remains a skip token as it duplicates ADA info.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
RTX 6000 ADA and A6000 are distinct cards — RTX_4000_ADA_SFF now
produces RTX4000ADA instead of RTX, avoiding visual ambiguity with
the segment separator (10xRTX4000ADA vs 10xRTX-1x…).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add config_type field ("server"|"storage") to Configuration and LocalConfiguration
- Create modal: Сервер/СХД segmented control in configs.html and project_detail.html
- Configurator: ENC/DKC/CTL categories in Base tab, HIC section in PCI tab hidden for server configs
- Add SW tab (categories: SW) to configurator, visible only when components present
- TAB_CONFIG.pci: add HIC section for storage HIC adapters (separate from server HBA/NIC)
- Migration 029: ALTER TABLE qt_configurations ADD COLUMN config_type
- Fix: skip Error 1833 (Cannot change column used in FK) in GORM AutoMigrate
- Operator guide: docs/storage-components-guide.md with LOT naming rules and DE4000H catalog template
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SyncPricelistsIfNeeded was called synchronously in Create(), blocking
the HTTP response for several seconds while pricelist data was fetched.
Users clicking multiple times caused 6+ duplicate configurations.
- Run SyncPricelistsIfNeeded in a goroutine so Create() returns immediately
- Add TryLock mutex to SyncPricelistsIfNeeded to skip concurrent calls
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add ErrCannotRenameMainVariant; ProjectService.Update now returns
this error if the caller tries to change the Variant of a main
project (empty Variant) — ensures there is always exactly one main
- Handle ErrCannotRenameMainVariant in PUT /api/projects/:uuid with 400
- Set document.title dynamically from breadcrumb data:
- Configurator: "CODE / variant / Config name — QuoteForge"
- Project detail: "CODE / variant — QuoteForge"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove 'auto (latest active)' option from pricelist dropdowns; new
configs pre-select the first active pricelist instead
- Stop resetting stored pricelist_id to null when it is not in the
active list (deactivated pricelists are shown as inactive options)
- RefreshPricesNoAuth now accepts an optional pricelist_id; uses the
UI-selected pricelist, then the config's stored pricelist, then
latest as a last-resort fallback — no longer silently overwrites
the stored pricelist on every price refresh
- Same fix applied to RefreshPrices (with auth)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expand 03-database.md with complete table structure reference for all
23 tables in the final schema: active QuoteForge tables, competitor
subsystem, legacy RFQ tables, and server-side-only tables.
Also clarifies access patterns per group and notes removal of
qt_client_local_migrations from the schema.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Split into two sections: Цена покупки and Цена продажи
- All price cells show unit price (per 1 pcs); totals only in footer
- Added note "Цены указаны за 1 шт." next to each table heading
- Buy table: Своя цена redistributes proportionally with green/red coloring vs estimate; footer shows % diff
- Sale table: configurable uplift (default 1.3) applied to estimate; Склад/Конкуренты fixed at ×1.3
- Footer Склад/Конкуренты marked red with asterisk tooltip when coverage is partial
- CSV export updated: all 8 columns, SPEC-BUY/SPEC-SALE suffix, no % annotation in totals
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Render competitor prices in Pricing tab (all three row branches)
- Add footer total accumulation for competitor column
- Deduplicate local_pricelist_items via migration + unique index
- Use ON CONFLICT DO NOTHING in SaveLocalPricelistItems to prevent duplicates on concurrent sync
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>