From 0258531c3d65def6561e4a6095f6d35838e526f6 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sun, 1 Feb 2026 08:15:22 -0800 Subject: [PATCH] Remove debug alerts from portal.js Co-Authored-By: Claude Opus 4.5 --- portal/portal.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/portal/portal.js b/portal/portal.js index 0b50156..89236f8 100644 --- a/portal/portal.js +++ b/portal/portal.js @@ -715,7 +715,6 @@ const Portal = { // Load business info for settings async loadBusinessInfo() { - alert('DEBUG 1: loadBusinessInfo called, bizId=' + this.config.businessId); try { const response = await fetch(`${this.config.apiBaseUrl}/businesses/get.cfm`, { method: 'POST', @@ -723,7 +722,6 @@ const Portal = { body: JSON.stringify({ BusinessID: this.config.businessId }) }); const data = await response.json(); - alert('DEBUG 2: API response OK=' + data.OK + ', hasBiz=' + !!data.BUSINESS + ', keys=' + (data.BUSINESS ? Object.keys(data.BUSINESS).join(',') : 'none')); if (data.OK && data.BUSINESS) { // Normalize all keys to uppercase for consistent access @@ -733,8 +731,6 @@ const Portal = { Object.keys(raw).forEach(k => { biz[k.toUpperCase()] = raw[k]; }); this.currentBusiness = biz; - alert('DEBUG 3: BRANDCOLOR=[' + biz.BRANDCOLOR + '] HEADERIMAGEURL=[' + biz.HEADERIMAGEURL + ']'); - // Populate form fields document.getElementById('settingBusinessName').value = biz.NAME || biz.BUSINESSNAME || ''; document.getElementById('settingPhone').value = biz.PHONE || biz.BUSINESSPHONE || ''; @@ -758,12 +754,8 @@ const Portal = { const headerUrl = biz.HEADERIMAGEURL || ''; if (headerPreview && headerUrl) { headerPreview.onload = function() { - alert('DEBUG 4: img loaded OK'); if (headerWrapper) headerWrapper.style.display = 'block'; }; - headerPreview.onerror = function() { - alert('DEBUG 4: img FAILED to load: ' + headerPreview.src); - }; headerPreview.src = `${headerUrl}?t=${Date.now()}`; } @@ -771,7 +763,6 @@ const Portal = { this.renderHoursEditor(biz.HOURSDETAIL || biz.BUSINESSHOURSDETAIL || []); } } catch (err) { - alert('DEBUG ERR: ' + err.message); console.error('[Portal] Error loading business info:', err); } },