Merge pull request 'fix(sf-legacy): velocity=0 → '—' в MarketTab (consistency со «Срок продаж»)' (#362) from fix/legacy-market-velocity-zero-as-null into main
Reviewed-on: #362
This commit is contained in:
commit
f6ea27c4f5
1 changed files with 6 additions and 1 deletions
|
|
@ -60,7 +60,12 @@ export function MarketTab({ data }: Props) {
|
||||||
// competitors count as proxy for active (строящихся) count for now.
|
// competitors count as proxy for active (строящихся) count for now.
|
||||||
const activeCount = data.competitors.length;
|
const activeCount = data.competitors.length;
|
||||||
const radiusKm = getRadiusKm(data);
|
const radiusKm = getRadiusKm(data);
|
||||||
const velocityPerMonth = data.velocity?.monthly_velocity_sqm ?? null;
|
// Treat zero velocity as "no data" — backend returns 0 when competitors
|
||||||
|
// are unmapped to Objective ground truth (OBJ-3). Showing "0.0 м²/мес"
|
||||||
|
// is misleading; "—" makes it clear data is unavailable.
|
||||||
|
const velocityRaw = data.velocity?.monthly_velocity_sqm;
|
||||||
|
const velocityPerMonth =
|
||||||
|
velocityRaw != null && velocityRaw > 0 ? velocityRaw : null;
|
||||||
const maxMixPct = getMaxMixPct(data);
|
const maxMixPct = getMaxMixPct(data);
|
||||||
const salesPeriodMonths = getSalesPeriodMonths(data);
|
const salesPeriodMonths = getSalesPeriodMonths(data);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue