gendesign/frontend
lekss361 088c1ab2cf
feat(site-finder): VelocityBlock в MarketTab (#34 sub-PR 2/2 FINAL) (#147)
* feat(site-finder): VelocityBlock в MarketTab (#34 sub-PR 2/2 FINAL)

D2 velocity-score frontend: score gauge, period meta, top 5 competitors table.
TS types (Velocity/VelocityCompetitor/VelocityPeriod) добавлены.
Guard "velocity" in data для backward-compat pre-#146.

tsc 0 errors, ESLint 0 warnings.

Closes #34

* fix(site-finder): align VelocityBlock TS types with backend response shape

Per #147 bot review — cross-stack contract mismatch:

Backend velocity.py (PR #146 merged) returns:
  obj_id, name, dev_name, obj_class, district_name, distance_m, total_sqm_period

Frontend types had:
  obj_id, name, class, distance_m, total_sqm

Result: c.class undefined → never showed class chip; c.total_sqm undefined →
Math.round(NaN) = NaN, 'не число' в table column для всех 5 строк.

## Fix

- VelocityCompetitor.class → obj_class
- VelocityCompetitor.total_sqm → total_sqm_period
- Added optional dev_name, district_name fields
- Updated VelocityBlock.tsx — все 3 references (guard, chip render, table cell)

Refs: #34, #147

---------

Co-authored-by: lekss361 <claudestars@proton.me>
2026-05-15 01:44:16 +03:00
..
public feat(docs): /docs/b2b-channels (rendered) + /docs/b2b-channels.md (raw) for sharing 2026-05-11 23:36:02 +03:00
src feat(site-finder): VelocityBlock в MarketTab (#34 sub-PR 2/2 FINAL) (#147) 2026-05-15 01:44:16 +03:00
.dockerignore fix(scraper): диагностируем «кнопка не работает» — Redis lock + task_received log 2026-04-28 23:17:42 +03:00
.env.example init 2026-04-25 13:45:19 +03:00
.eslintrc.json init 2026-04-25 13:45:19 +03:00
Dockerfile perf(ci): parallelize docker builds + add npm cache mount 2026-05-11 15:01:10 +03:00
next-env.d.ts add interactive analytics dashboard for Sverdlovsk market and PRINZIP 2026-04-27 16:55:30 +03:00
next.config.ts feat(docs): /docs/b2b-channels (rendered) + /docs/b2b-channels.md (raw) for sharing 2026-05-11 23:36:02 +03:00
package-lock.json add interactive analytics dashboard for Sverdlovsk market and PRINZIP 2026-04-27 16:55:30 +03:00
package.json add interactive analytics dashboard for Sverdlovsk market and PRINZIP 2026-04-27 16:55:30 +03:00
tsconfig.json init 2026-04-25 13:45:19 +03:00