diff --git a/src/modules/geoportal/v2/feature-info-panel.tsx b/src/modules/geoportal/v2/feature-info-panel.tsx
index 009a634..31903bf 100644
--- a/src/modules/geoportal/v2/feature-info-panel.tsx
+++ b/src/modules/geoportal/v2/feature-info-panel.tsx
@@ -6,7 +6,7 @@ import {
X, RefreshCw, Loader2, FileText, Download, AlertCircle,
Home, Building, Building2, MapPin, ChevronRight, Users,
Sparkles, User, ShieldCheck, AlertTriangle, HelpCircle,
- Factory, Warehouse,
+ Factory, Warehouse, ExternalLink, Hash, Layers, CalendarDays,
} from "lucide-react";
import { cn } from "@/shared/lib/utils";
@@ -98,6 +98,23 @@ const LABEL: Record = {
UAT: "UAT",
UAT_SIRUTA: "SIRUTA",
PARCEL_TECH_ENRICHED_AT: "Actualizat tehnic",
+ // Cladire-specific (CLADIRI_ACTIVE)
+ CLADIRE_TYPE: "Tip clădire",
+ CLADIRE_DESTINATIE: "Destinație",
+ CLADIRE_DESTINATIE_CODE: "Cod destinație",
+ CLADIRE_SUBTYPE: "Subtip",
+ CLADIRE_REGIM: "Regim înălțime",
+ CLADIRE_NIVELURI: "Niveluri",
+ CLADIRE_AN_CONSTRUIRE: "An construire",
+ CLADIRE_AREA_CF: "Suprafață CF",
+ CLADIRE_LANDBOOK_IE: "Carte funciară IE",
+ CLADIRE_COMMON_PARTS: "Părți comune",
+ CLADIRE_OBSERVATII: "Observații",
+ CLADIRE_UNITS_NO_ANCPI: "Nr. unități ANCPI",
+ CLADIRE_ENERGETIC_CLASS: "Clasă energetică",
+ IS_LEGAL_BUILDING: "Clădire legală",
+ IS_CONDOMINIUM: "Condominium",
+ ENRICHED_AT: "Actualizat",
};
// ────────────────────────────────────────────────────────── formatters
@@ -657,29 +674,10 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
],
);
- // Auto-enrich on sparse data
- useEffect(() => {
- if (basic || !detail || refreshing) return;
- const e = (detail.enrichment ?? {}) as Record;
- const richPresent = Boolean(e.NR_CF || e.ADRESA || e.PROPRIETARI);
- if (richPresent) return;
- const parcelKey =
- String(detail.id ?? "") ||
- `${feature.siruta}:${feature.cadastralRef}:${feature.layerId}`;
- const ssKey = `gis_auto_enrich_${parcelKey}`;
- if (typeof sessionStorage === "undefined") return;
- if (sessionStorage.getItem(ssKey)) return;
- sessionStorage.setItem(ssKey, "1");
- void refreshFromAncpi();
- }, [
- basic,
- detail,
- refreshing,
- feature.siruta,
- feature.cadastralRef,
- feature.layerId,
- refreshFromAncpi,
- ]);
+ // Auto-enrich on sparse data — DISABLED per Marius. Refresh fires
+ // only when the user explicitly hits the "Actualizează" button in
+ // the Date eTerra header. Keeps the eTerra account pool out of
+ // browse-spam territory.
const handleBuildingSelect = (b: BuildingItem) => {
if (!onSelectFeature) return;
@@ -746,6 +744,40 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
? buildings.length
: hasBuildingFlag;
+ // Cladire-specific (only meaningful for CLADIRI_ACTIVE)
+ const cladireType = String(enrichment.CLADIRE_TYPE ?? "").trim();
+ const cladireDestinatie = String(enrichment.CLADIRE_DESTINATIE ?? "").trim();
+ const cladireSubtype = String(enrichment.CLADIRE_SUBTYPE ?? "").trim();
+ const cladireRegim = String(enrichment.CLADIRE_REGIM ?? "").trim();
+ const cladireNiveluri = enrichment.CLADIRE_NIVELURI;
+ const cladireAn = String(enrichment.CLADIRE_AN_CONSTRUIRE ?? "").trim();
+ const cladireAreaCf = formatArea(enrichment.CLADIRE_AREA_CF);
+ const cladireObservatii = String(enrichment.CLADIRE_OBSERVATII ?? "").trim();
+ const cladireLandbookIe = String(enrichment.CLADIRE_LANDBOOK_IE ?? "").trim();
+ const cladireCommonParts = String(enrichment.CLADIRE_COMMON_PARTS ?? "").trim();
+ const cladireUnitsNo = enrichment.CLADIRE_UNITS_NO_ANCPI;
+ const cladireEnergetic = String(enrichment.CLADIRE_ENERGETIC_CLASS ?? "").trim();
+ const isLegalBuilding = enrichment.IS_LEGAL_BUILDING;
+ const isCondominium = Number(enrichment.IS_CONDOMINIUM ?? 0) === 1;
+
+ const hasCladireData =
+ isCladiri &&
+ Boolean(
+ cladireType ||
+ cladireDestinatie ||
+ cladireSubtype ||
+ cladireRegim ||
+ cladireAn ||
+ cladireAreaCf ||
+ cladireObservatii ||
+ cladireLandbookIe ||
+ cladireEnergetic ||
+ cladireNiveluri != null ||
+ cladireUnitsNo != null ||
+ isLegalBuilding != null ||
+ isCondominium,
+ );
+
const isActive = detail?.isActive !== false;
const cadrefHeader = feature.cadastralRef || feature.objectId || "—";
@@ -882,27 +914,39 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
Date eTerra
-
+
+
+
+
+ eterra.live
+
+
@@ -964,11 +1008,19 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
)}
{(tipInscriere || dataCererii || actProp) && (
-
- {tipInscriere && }
- {dataCererii && }
- {actProp && }
-
+
+
+
+
+ Înscriere
+
+
+
+ {tipInscriere && }
+ {dataCererii && }
+ {actProp && }
+
+
)}
@@ -992,6 +1044,102 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
)}
+ {/* Caracteristici corp (cladiri only) */}
+ {!loading && isCladiri && hasCladireData && (
+
+
+
+
+ Caracteristici corp
+
+
+
+ {/* Tip + destinatie + subtype as chips */}
+
+ {cladireType && {cladireType}}
+ {cladireDestinatie && (
+ {cladireDestinatie}
+ )}
+ {cladireSubtype && cladireSubtype !== cladireDestinatie && (
+ {cladireSubtype}
+ )}
+ {isCondominium && (
+ }
+ >
+ Condominium{cladireUnitsNo != null && ` · ${cladireUnitsNo} u.`}
+
+ )}
+ {Number(isLegalBuilding) === 1 && (
+ }
+ >
+ Cu acte
+
+ )}
+ {Number(isLegalBuilding) === 0 && (
+ }
+ >
+ Fără acte
+
+ )}
+
+
+ {/* Grid 3-col metrics: regim / niveluri / an */}
+ {(cladireRegim || cladireNiveluri != null || cladireAn) && (
+
+
+
+ Regim
+
+
+ {cladireRegim || "—"}
+
+
+
+
+ Niveluri
+
+
+ {cladireNiveluri != null && cladireNiveluri !== ""
+ ? String(cladireNiveluri)
+ : "—"}
+
+
+
+
+ An
+
+
+ {cladireAn || "—"}
+
+
+
+ )}
+
+ {cladireAreaCf && (
+
+ )}
+ {cladireLandbookIe && (
+
+ )}
+ {cladireEnergetic && (
+
+ )}
+ {cladireCommonParts && (
+
+ )}
+ {cladireObservatii && (
+
+ )}
+
+
+ )}
+
{/* Apartamente (cladiri only) */}
{!loading && isCladiri && (condoLoading || (condoOwners && condoOwners.length > 0)) && (