From 013413a01c5ed244940adb75bc8ba9766b4629de Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 11:49:40 +0000 Subject: [PATCH] Add error handling to re-enable buttons on save failure Co-authored-by: naielv <109038805+naielv@users.noreply.github.com> --- src/page/pagos.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/page/pagos.js b/src/page/pagos.js index b4463eb..3f978a7 100644 --- a/src/page/pagos.js +++ b/src/page/pagos.js @@ -507,6 +507,16 @@ PAGES.pagos = { document.getElementById("actionStatus").style.display = "none"; setUrlHash("pagos," + ticketId); }, SAVE_WAIT); + }).catch((e) => { + console.warn('DB.put error', e); + // Re-enable confirm button on error + var confirmBtn = document.getElementById(btn_confirm + "2"); + if (confirmBtn) { + confirmBtn.disabled = false; + confirmBtn.style.opacity = "1"; + } + document.getElementById("actionStatus").style.display = "none"; + toastr.error("Error al guardar la transacción"); }); }