From a1e12db72f6b343392de9e72d04b264c9ea16ae4 Mon Sep 17 00:00:00 2001 From: bot-backend Date: Sun, 26 Jul 2026 22:38:36 +0300 Subject: [PATCH] fix(tradein/v2): replace decorative pseudo-map with real Leaflet+OSM map in ParamsPanel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 01 ПАРАМЕТРЫ КВАРТИРЫ showed a fake SVG (grid + invented streets + radius rings) above the address field, with no real coordinates driving it — the +/- buttons scaled the picture, not a map. Replaced with a real Leaflet map (same CDN-loader/tile pattern as SourcesMap.tsx/MapPicker.tsx): - centred on coords from the picked geocode suggestion (lat/lon), with a marker on the address - radius circle in real metres (L.circle), synced with РАДИУС АНАЛИЗА; "Авто" previews the backend's primary two-tier default (1000 m) - +/- buttons drive real Leaflet zoom (zoomIn/zoomOut), not a CSS scale hack - removed the "Схематично · не географическая карта" disclaimer (no longer true) — OSM attribution now comes from Leaflet's own attribution control - tidy placeholder (icon + hint text) while no address is picked yet, instead of an empty box or a broken map The old %-projected analog price pins (mapMarkers()) are not replotted on the real map — their positions were fabricated against a fixed non-scale grid and would be geographically wrong at the map's real zoom. --- .../components/trade-in/v2/ParamsPanel.tsx | 588 +++++++++++------- 1 file changed, 365 insertions(+), 223 deletions(-) diff --git a/tradein-mvp/frontend/src/components/trade-in/v2/ParamsPanel.tsx b/tradein-mvp/frontend/src/components/trade-in/v2/ParamsPanel.tsx index 1edcbc9d..46d8e009 100644 --- a/tradein-mvp/frontend/src/components/trade-in/v2/ParamsPanel.tsx +++ b/tradein-mvp/frontend/src/components/trade-in/v2/ParamsPanel.tsx @@ -7,9 +7,16 @@ // styles are UNCHANGED — only the data plumbing differs (display
s became // s styled identically, dropdowns now feed real enum values). RU dropdown // labels <-> API enum values go through HOUSE_TYPE_*/REPAIR_* maps in ./mappers. -// РАДИУС is now wired (radius_m on submit + the outer map ring scales with it); -// the CRM dropdown still has no backend → kept visually but disabled. Hover/active -// + @keyframes live in a pp-prefixed local