fix(geoportal-v2): CF button → deep-link to parcel-sync ePay tab

User pushback on the pool-based CF flow: he wants his own ePay account
(per-user creds, visible credit balance, decrement per order) — not the
shared orchestrator pool which hides cost attribution.

V2 panel "Comandă CF" now opens /parcel-sync?tab=epay&cad=<ref> in a
new tab where the legacy UI handles ordering with credits. The
/api/cf/* gis-api routes stay (used elsewhere + future SaaS consumers)
but the V2 button doesn't hit them.

Plus diagnostic on /api/gis/parcela showing enrichment presence + key
count to debug "data nu raman" — should reveal whether Marius's session
is getting full enrichment back from gis-api.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude VM
2026-05-19 08:16:55 +03:00
parent 293d15edf2
commit 77da69e29f
2 changed files with 23 additions and 51 deletions
+11 -1
View File
@@ -20,9 +20,19 @@ export async function GET(
}
try {
return NextResponse.json(await gisApi.parcela.get(id));
const data = await gisApi.parcela.get(id);
const enr =
(data as { enrichment?: Record<string, unknown> } | null)?.enrichment ?? null;
console.log(
"[gis-parcela] id=%s has_enrich=%s keys=%d",
id.slice(0, 8),
!!enr,
enr ? Object.keys(enr).length : 0,
);
return NextResponse.json(data);
} catch (err) {
if (err instanceof GisApiError) {
console.log("[gis-parcela] gis-api %d %s", err.status, err.code);
return NextResponse.json(
{ error: err.code, status: err.status },
{ status: err.status },