gendesign/frontend/src/components
lekss361 553aad86c3 feat(layouts): PDF ТЗ endpoint + BestLayoutsBlock UI (#113 PR D)
Backend (~330 LOC):
- POST /api/v1/parcels/{cad_num}/best-layouts/pdf via WeasyPrint
- services/exporters/layout_tz_pdf.py — HTML template с XSS-escape (html.escape)
  для cad_num/parcel_address/rationale_text/time_window
- 5 unit tests (skip on Windows если WeasyPrint deps missing)

Frontend (~800 LOC):
- BestLayoutsBlock.tsx — DataQualityCard + TopLayoutsTable + RecommendationCard
  + PDF download button (Blob → revokeObjectURL)
- useBestLayouts.ts — TanStack useMutation hook
- types/best-layouts.ts — manual TS types
- MarketTab.tsx +4 LOC integration после competitors

Pre-push fixes per review:
- XSS escape user-data в PDF HTML
- sold_pct_of_supply — убрать double ×100 (backend уже 0..100)
- alert() → pdfError state
- isNaN → Number.isNaN
- 7 inline-styles → Tailwind utilities

Phase 2.1 complete. Phase 2.2 (layout_type/balcony_count via B2B Объектив
#52) — follow-up issue.
2026-05-16 12:36:24 +03:00
..
admin refactor(frontend): extract SectionLabel + EmptyState + adminStyles shared (#132) 2026-05-14 23:55:38 +03:00
analytics feat(velocity): migrate D2 sales source → objective_corpus_room_month (#158) 2026-05-15 09:34:00 +03:00
site-finder feat(layouts): PDF ТЗ endpoint + BestLayoutsBlock UI (#113 PR D) 2026-05-16 12:36:24 +03:00
ui refactor(frontend): extract SectionLabel + EmptyState + adminStyles shared (#132) 2026-05-14 23:55:38 +03:00