gendesign/frontend/src/components/site-finder/ptica/cockpit/InvestmentClearance.tsx
Light1YT 24b5e6047f
All checks were successful
CI / changes (pull_request) Successful in 6s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Successful in 1m6s
CI / openapi-codegen-check (pull_request) Successful in 2m1s
feat(ptica): complete cockpit lower-grid + bottom-grid sections
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.
2026-06-21 00:33:15 +05:00

59 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"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>
);
}