refactor: унифицировать CSV-экспорт, перенести pricing на сервер

- Вынести 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>
This commit is contained in:
Mikhail Chusavitin
2026-05-19 12:37:47 +03:00
parent e1f34ae81b
commit 55acbe138b
4 changed files with 117 additions and 102 deletions

View File

@@ -1270,6 +1270,7 @@ func setupRouter(cfg *config.Config, local *localdb.LocalDB, connMgr *db.Connect
})
configs.GET("/:uuid/export", exportHandler.ExportConfigCSV)
configs.POST("/:uuid/export/pricing", exportHandler.ExportConfigPricingCSV)
// Vendor spec (BOM) endpoints
configs.GET("/:uuid/vendor-spec", vendorSpecHandler.GetVendorSpec)