Port the prototype's missing sections — the React cockpit had only hero +
Development Scan, so the deployed page was incomplete («поплывшее»). Add:
- lower-grid: ОКС · Development Potential · Recommended Product (квартирография)
· Инсоляционная матрица (opens 3D);
- bottom-grid: Investment Clearance · Buy Signal · Legal Status · Site Verdict
(«Приобретать/Нельзя/Нужна проверка» plaque + checklist).
Move ОКС + Инсоляция out of DevelopmentScan → scan = 7 cards (prototype IA).
Data honesty: Development Potential (real КСИТ/площадь/плотность), Recommended
Product (forecast product_tz), Buy Signal + Site Verdict (forecast deficit +
gate_verdict, real, three-state), Legal (zouit/red_lines/gate). Investment
Clearance all «—» «после финмодели (§23)» — no fabricated numbers. Typed
{value,isReal,caption} adapters; scoped dark CSS; forecast-pending safe.
Cleanup: drop orphaned adaptOksCard/adaptInsolationCard; add .metric/.bignum.
57 lines
2 KiB
TypeScript
57 lines
2 KiB
TypeScript
"use client";
|
||
|
||
/**
|
||
* DevelopmentPotentialCard — lower-grid «Development Potential» card. Renders the
|
||
* REAL ёмкость-метрики (площадь · КСИТ · плотность · высота · пятно · продаваемая)
|
||
* from `adaptPotentialCard` (geometry + НСПД-регламент, post-#1847) as the
|
||
* prototype's `.potential-grid` tiles, honest «—» where an input is absent.
|
||
* "Подробнее" opens the potential drawer.
|
||
*/
|
||
|
||
import styles from "@/app/site-finder/analysis/[cad]/ptica/ptica.module.css";
|
||
import type { ParcelAnalysis } from "@/types/site-finder";
|
||
import { adaptPotentialCard } from "@/components/site-finder/ptica/ptica-adapt";
|
||
import type { DrawerKey } from "@/components/site-finder/ptica/drawers/drawer-keys";
|
||
|
||
interface Props {
|
||
analysis: ParcelAnalysis;
|
||
onOpenDrawer: (key: DrawerKey) => void;
|
||
}
|
||
|
||
export function DevelopmentPotentialCard({ analysis, onOpenDrawer }: Props) {
|
||
const { metrics } = adaptPotentialCard(analysis);
|
||
|
||
return (
|
||
<div className={styles.card}>
|
||
<div className={styles.cardHead}>
|
||
<h3 className={styles.cardTitle}>Development Potential</h3>
|
||
</div>
|
||
|
||
<div className={styles.potentialGrid}>
|
||
{metrics.map((m) => (
|
||
<div key={m.label} className={styles.metric}>
|
||
<div className={styles.metricLabel}>{m.label}</div>
|
||
<div
|
||
className={`${styles.metricValue} ${m.lead ? styles.metricValueLg : ""} ${
|
||
m.isReal ? "" : styles.metricValuePlaceholder
|
||
}`}
|
||
title={m.caption}
|
||
>
|
||
{m.value}
|
||
{m.unit && <span className={styles.metricUnit}>{m.unit}</span>}
|
||
</div>
|
||
</div>
|
||
))}
|
||
</div>
|
||
|
||
<button
|
||
type="button"
|
||
className={styles.detailBtn}
|
||
onClick={() => onOpenDrawer("potential")}
|
||
title="Открыть детализацию потенциала"
|
||
>
|
||
Подробнее
|
||
</button>
|
||
</div>
|
||
);
|
||
}
|