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