Update app.js

This commit is contained in:
oliver
2026-06-09 13:58:01 -03:00
parent 59871432b9
commit b86a3293da
+9 -3
View File
@@ -1012,12 +1012,18 @@ async function savePassword() {
ACCOUNT / USER PANEL ACCOUNT / USER PANEL
═══════════════════════════════════════════════════════════════ */ ═══════════════════════════════════════════════════════════════ */
function toggleUserPanel() { function toggleUserPanel() {
console.log("[account] toggleUserPanel called");
const backdrop = document.getElementById("account-backdrop"); const backdrop = document.getElementById("account-backdrop");
document.getElementById("acct-email-display").textContent = if (!backdrop) {
currentEmail || "—"; console.error("[account] backdrop not found");
return;
}
// Open first — before anything else can throw
backdrop.classList.add("open");
const emailEl = document.getElementById("acct-email-display");
if (emailEl) emailEl.textContent = currentEmail || "—";
const invInput = document.getElementById("invoice-email-input"); const invInput = document.getElementById("invoice-email-input");
if (invInput) invInput.value = localStorage.getItem("al_invoice_email") || ""; if (invInput) invInput.value = localStorage.getItem("al_invoice_email") || "";
backdrop.classList.add("open");
loadInvoices(); loadInvoices();
} }