From 8024ad04217e8b535094ce98383abfca968fdbf4 Mon Sep 17 00:00:00 2001 From: Claude VM Date: Tue, 19 May 2026 07:42:07 +0300 Subject: [PATCH] fix(faza-f): skip local ePay connected/credits gate on gis-ac path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit epay-order-button.tsx was disabling the "Comanda CF" button on !epayStatus.connected even for gis.ac pilot users. The new path dispatches ePay calls through the orchestrator's shared account pool — no per-user ePay session or credit balance applies. Legacy path keeps the original gates. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components/epay-order-button.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/modules/parcel-sync/components/epay-order-button.tsx b/src/modules/parcel-sync/components/epay-order-button.tsx index ed9feae..7b0df83 100644 --- a/src/modules/parcel-sync/components/epay-order-button.tsx +++ b/src/modules/parcel-sync/components/epay-order-button.tsx @@ -114,10 +114,15 @@ export function EpayOrderButton({ } }, [nrCadastral, siruta, judetName, uatName, useGisAc]); + // On the gis.ac path, the orchestrator dispatches ePay calls through + // a shared account pool — the user doesn't need a personally-connected + // ePay session, and we don't have per-user credit info to gate on. + // Legacy path still requires local connection + credits. const disabled = - !epayStatus.connected || - (epayStatus.credits != null && epayStatus.credits < 1) || - ordering; + ordering || + (!useGisAc && + (!epayStatus.connected || + (epayStatus.credits != null && epayStatus.credits < 1))); const isRenew = !!label; // "Actualizeaza" mode for expired extracts const Icon = isRenew ? RefreshCw : FileText; @@ -126,8 +131,10 @@ export function EpayOrderButton({ if (error) return error; if (ordering) return "Se comanda..."; if (ordered) return "Extras CF valid"; - if (!epayStatus.connected) return "ePay neconectat"; - if (epayStatus.credits != null && epayStatus.credits < 1) return "Credite insuficiente"; + if (!useGisAc) { + if (!epayStatus.connected) return "ePay neconectat"; + if (epayStatus.credits != null && epayStatus.credits < 1) return "Credite insuficiente"; + } return tooltipText ?? "Comanda extras CF (1 credit)"; };