Документация
diff --git a/tradein-mvp/frontend/src/components/trade-in/SourcesProgress.tsx b/tradein-mvp/frontend/src/components/trade-in/SourcesProgress.tsx
index c6f0e8c0..5728106b 100644
--- a/tradein-mvp/frontend/src/components/trade-in/SourcesProgress.tsx
+++ b/tradein-mvp/frontend/src/components/trade-in/SourcesProgress.tsx
@@ -1,11 +1,12 @@
"use client";
/**
- * SourcesProgress — карточка «Шаг B · Агрегация» под mockup tradein.html.
+ * SourcesProgress — карточка «Шаг B · Агрегация».
*
- * Показывает статус 7 строк-источников. Реально работают 4: Cian + Avito +
- * Yandex + N1. ДомКлик и Restate пока не реализованы — показываем idle для
- * соответствия макету.
+ * Показывает 5 реальных источников: 4 источника объявлений (Циан, Авито,
+ * Яндекс, N1) + Росреестр (внутренние сделки). Статусы выводятся из реального
+ * `estimate.sources_used` / `countBySource` / `actual_deals`; источник без
+ * вклада честно показывает «нет данных».
*/
import type { AggregatedEstimate } from "@/types/trade-in";
@@ -20,15 +21,10 @@ interface SourceRow {
dotClass: string;
status: "done" | "loading" | "error" | "idle";
count?: number;
- median?: number;
-}
-
-function formatMln(rub: number): string {
- return `${(rub / 1_000_000).toFixed(2).replace(".", ",")} млн`;
}
export function SourcesProgress({ estimate, isPending }: Props) {
- // Маппинг реальных данных из estimate на 7 строк-источников
+ // Маппинг реальных данных из estimate на строки-источники
const used = new Set(estimate?.sources_used ?? []);
const isDone = estimate !== null && !isPending;
@@ -49,7 +45,6 @@ export function SourcesProgress({ estimate, isPending }: Props) {
dotClass: "cian",
status: used.has("cian") ? "done" : (isPending ? "loading" : "idle"),
count: countBySource.cian,
- median: used.has("cian") ? estimate?.median_price_rub : undefined,
},
{
key: "avito",
@@ -57,13 +52,6 @@ export function SourcesProgress({ estimate, isPending }: Props) {
dotClass: "avito",
status: used.has("avito") ? "done" : (isPending ? "loading" : "idle"),
count: countBySource.avito,
- median: used.has("avito") ? estimate?.median_price_rub : undefined,
- },
- {
- key: "domklik",
- label: "ДомКлик Прайс",
- dotClass: "dom",
- status: isPending ? "loading" : "idle",
},
{
key: "yandex",
@@ -71,13 +59,6 @@ export function SourcesProgress({ estimate, isPending }: Props) {
dotClass: "yandex",
status: used.has("yandex") ? "done" : (isPending ? "loading" : "idle"),
count: countBySource.yandex,
- median: used.has("yandex") ? estimate?.median_price_rub : undefined,
- },
- {
- key: "restate",
- label: "Restate",
- dotClass: "etagi",
- status: isPending ? "loading" : "idle",
},
{
key: "n1",
@@ -85,7 +66,6 @@ export function SourcesProgress({ estimate, isPending }: Props) {
dotClass: "n1",
status: used.has("n1") ? "done" : (isPending ? "loading" : "idle"),
count: countBySource.n1,
- median: used.has("n1") ? estimate?.median_price_rub : undefined,
},
{
key: "rosreestr",