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.
59 lines
1.9 KiB
TypeScript
59 lines
1.9 KiB
TypeScript
"use client";
|
||
|
||
/**
|
||
* InvestmentClearance — bottom-grid «Investment Clearance» card. The §23 finance
|
||
* model is NOT in the backend, so every bignum (GDV / Cost / Profit / ROI / IRR)
|
||
* is an honest «—» placeholder with a «после финмодели (§23)» caption — NO
|
||
* fabricated numbers. The bignum layout matches the prototype. "Подробнее" opens
|
||
* the finance drawer.
|
||
*/
|
||
|
||
import styles from "@/app/site-finder/analysis/[cad]/ptica/ptica.module.css";
|
||
import { adaptInvestmentClearance } from "@/components/site-finder/ptica/ptica-adapt";
|
||
import type { DrawerKey } from "@/components/site-finder/ptica/drawers/drawer-keys";
|
||
|
||
interface Props {
|
||
onOpenDrawer: (key: DrawerKey) => void;
|
||
}
|
||
|
||
export function InvestmentClearance({ onOpenDrawer }: Props) {
|
||
const { bignums, caption } = adaptInvestmentClearance();
|
||
|
||
return (
|
||
<div className={styles.card}>
|
||
<div className={styles.cardHead}>
|
||
<h3 className={styles.cardTitle}>
|
||
Investment Clearance
|
||
<span className={styles.cardTitleSub}>финансовая модель</span>
|
||
</h3>
|
||
<button
|
||
type="button"
|
||
className={styles.detailBtn}
|
||
onClick={() => onOpenDrawer("finance")}
|
||
title="Открыть финансовую модель"
|
||
>
|
||
Подробнее
|
||
</button>
|
||
</div>
|
||
|
||
<div className={styles.bignumRow}>
|
||
{bignums.map((b) => (
|
||
<div key={b.label} className={styles.bignum}>
|
||
<div className={styles.bignumLabel}>{b.label}</div>
|
||
<div
|
||
className={`${styles.bignumValue} ${
|
||
b.isReal ? "" : styles.bignumValuePlaceholder
|
||
}`}
|
||
title={b.caption}
|
||
>
|
||
{b.value}
|
||
</div>
|
||
{b.unit && <span className={styles.bignumUnit}>{b.unit}</span>}
|
||
</div>
|
||
))}
|
||
</div>
|
||
|
||
<p className={styles.bignumCaption}>{caption}</p>
|
||
</div>
|
||
);
|
||
}
|