feat(geoportal-v2): re-enable deep-enrich for cladiri + forward layerId
Orchestrator team shipped CLADIRI support in
/api/v1/parcel/enrich (PR4):
- DeepEnrichLayerId enum + optional layerId in input
- inferLayerIdFromCadref() regex /-C\d+(-U\d+)?$/ — covers apartments too
- loadFeature() now layer-aware (no more hardcoded
layerId='TERENURI_ACTIVE')
- fetchBuildingsForParcel skipped when running for a building
- HTTP layer accepts layerId in body
Confirmed live via gis-api container logs — manual-override calls
on "304629-C2" / "304629-C3" (CLADIRI) reach orchestrator and complete.
Architots side:
1. Re-enabled the "Actualizează" / "Încarcă din ANCPI" button for
cladiri. The disabled+tooltip gate I added last commit was the
right thing while the orchestrator path didn't accept buildings —
no longer needed.
2. refreshFromAncpi now forwards feature.layerId in the request body.
Skips the orchestrator's dash-suffix auto-detect — more reliable
than parsing "-C3" out of cadref each time.
3. ParcelRefBody type gained optional manualOverride + layerId fields
so callers can pass both through the thin client.
Note from orchestrator team: extractEnrichment populates only the
generic NR_CF / ADRESA / PROPRIETARI / PROPRIETARI_VECHI / SOLICITANT
keys today. The CLADIRE_TYPE / CLADIRE_DESTINATIE / CLADIRE_OBSERVATII
/ CLADIRE_NIVELURI etc. fields the V2 building panel renders come
from a different orchestrator pipeline (building-tech), already wired
+ populating those rows when the orchestrator's bulk-enrich runs.
Single-parcel deep-enrich for a building updates NR_CF/ADRESA/
PROPRIETARI but leaves CLADIRE_* alone unless that pipeline runs in
parallel — separate iteration if needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,14 @@ export interface ParcelRefBody {
|
||||
siruta: string;
|
||||
cadastralRef: string;
|
||||
force?: boolean;
|
||||
/** Per-tenant override flag for /parcel/enrich quota — bumps the
|
||||
* orchestrator's per-account cap from N to N×MANUAL_OVERRIDE_QUOTA_MULTIPLIER
|
||||
* for a single manual user action. Ignored by every other endpoint. */
|
||||
manualOverride?: boolean;
|
||||
/** Optional layer disambiguator. Required for deep-enrich on CLADIRI
|
||||
* (orchestrator now accepts both TERENURI_ACTIVE and CLADIRI_ACTIVE);
|
||||
* absent → orchestrator auto-detects from "-C\d+" suffix. */
|
||||
layerId?: "TERENURI_ACTIVE" | "CLADIRI_ACTIVE";
|
||||
}
|
||||
|
||||
export interface ImmAppsBody extends ParcelRefBody {
|
||||
|
||||
@@ -633,6 +633,10 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
|
||||
body: JSON.stringify({
|
||||
siruta: feature.siruta,
|
||||
cadastralRef: feature.cadastralRef,
|
||||
// Pass layerId so orchestrator skips its dash-suffix auto-detect
|
||||
// (more reliable than parsing "-C3" out of cadref). Orchestrator
|
||||
// PR ships 2026-05-20 — accepts CLADIRI_ACTIVE + TERENURI_ACTIVE.
|
||||
layerId: feature.layerId,
|
||||
force: true,
|
||||
...(opts.manual ? { manualOverride: true } : {}),
|
||||
}),
|
||||
@@ -938,8 +942,7 @@ export function FeatureInfoPanel({ feature, onClose, onSelectFeature, basic = fa
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => refreshFromAncpi({ manual: true })}
|
||||
disabled={refreshing || !feature.siruta || !feature.cadastralRef || isCladiri}
|
||||
title={isCladiri ? "Deep-enrich pentru construcții nu e încă suportat de orchestrator" : undefined}
|
||||
disabled={refreshing || !feature.siruta || !feature.cadastralRef}
|
||||
className={cn(
|
||||
"ml-auto inline-flex h-7 shrink-0 items-center gap-1.5 whitespace-nowrap rounded px-2 text-[11px] font-medium transition-colors",
|
||||
"border bg-background hover:bg-muted disabled:opacity-50",
|
||||
|
||||
Reference in New Issue
Block a user