From fd638855077cc39e603ab218645436c82c01328d Mon Sep 17 00:00:00 2001 From: Naiel <109038805+naielv@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:21:57 +0100 Subject: [PATCH] Update pagos.js --- src/page/pagos.js | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/src/page/pagos.js b/src/page/pagos.js index d3614af..d121c02 100644 --- a/src/page/pagos.js +++ b/src/page/pagos.js @@ -51,7 +51,7 @@ PAGES.pagos = { container.innerHTML = `

- Terminal de pago %%TITLE%% + Terminal de pago TeleSec

@@ -284,10 +284,36 @@ PAGES.pagos = { } } - // Paso 3 - document.getElementById("step2").style.display = "none"; - document.getElementById("step3").style.display = "block"; - document.getElementById("stepIndicator").innerText = "3"; + // Move to step 3 - confirmation + document.getElementById('step2').style.display = 'none'; + document.getElementById('step3').style.display = 'block'; + document.getElementById('stepIndicator').innerText = '3'; + + var monto = parseFloat(document.getElementById(numpad_display).value); + document.getElementById('confirmAmount').innerText = monto.toFixed(2) + '€'; + + // Populate confirmation data + var tipoText = document.getElementById(field_tipo).selectedOptions[0].text; + var metodoText = document.getElementById(field_metodo).selectedOptions[0].text; + var personaName = SC_Personas[personaId]?.Nombre || personaId; + var notas = document.getElementById(field_notas).value || "(sin notas)"; + + document.getElementById('confirmTipo').innerText = tipoText; + document.getElementById('confirmMetodo').innerText = metodoText; + document.getElementById('confirmPersona').innerText = personaName; + document.getElementById('confirmNotas').innerText = notas; + + if (tipo === 'Transferencia') { + var personaDestinoId = document.getElementById(field_persona_destino).value; + var personaDestinoName = SC_Personas[personaDestinoId]?.Nombre || personaDestinoId; + document.getElementById('confirmPersonaDestinoName').innerText = personaDestinoName; + document.getElementById('confirmPersonaDestino').style.display = 'block'; + } + + // Switch to final button layout + document.getElementById('buttonContainer').style.display = 'none'; + document.getElementById('buttonContainerFinal').style.display = 'grid'; + currentStep = 3; } };