fix(faza-f): skip local ePay connected/credits gate on gis-ac path

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) <noreply@anthropic.com>
This commit is contained in:
Claude VM
2026-05-19 07:42:07 +03:00
parent afef778612
commit 8024ad0421
@@ -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 (!useGisAc) {
if (!epayStatus.connected) return "ePay neconectat";
if (epayStatus.credits != null && epayStatus.credits < 1) return "Credite insuficiente";
}
return tooltipText ?? "Comanda extras CF (1 credit)";
};