Remove debug alerts from portal.js
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6ba3f3dffd
commit
0258531c3d
1 changed files with 0 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Reference in a new issue