Add temporary debug alerts for mobile header/color issue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-02-01 08:02:45 -08:00
parent 80b4c0da52
commit abbe1d60a6

View file

@ -736,11 +736,17 @@ const Portal = {
document.getElementById('settingState').value = biz.ADDRESSSTATE || biz.AddressState || '';
document.getElementById('settingZip').value = biz.ADDRESSZIP || biz.AddressZip || '';
// DEBUG: show what keys the API returned
alert('BIZ KEYS: ' + Object.keys(biz).join(', '));
alert('BRANDCOLOR=' + biz.BRANDCOLOR + ' | BrandColor=' + biz.BrandColor);
alert('HEADERIMAGEURL=' + biz.HEADERIMAGEURL + ' | HeaderImageURL=' + biz.HeaderImageURL);
// Load brand color if set
const brandColor = biz.BRANDCOLOR || biz.BrandColor;
if (brandColor) {
this.brandColor = brandColor;
const swatch = document.getElementById('brandColorSwatch');
alert('swatch found: ' + !!swatch + ' | brandColor: ' + brandColor);
if (swatch) swatch.style.backgroundColor = brandColor;
}
@ -748,8 +754,13 @@ const Portal = {
const headerPreview = document.getElementById('headerPreview');
const headerWrapper = document.getElementById('headerPreviewWrapper');
const headerUrl = biz.HEADERIMAGEURL || biz.HeaderImageURL;
alert('headerPreview found: ' + !!headerPreview + ' | headerUrl: ' + headerUrl);
if (headerPreview && headerUrl) {
headerPreview.onerror = function() {
alert('IMG LOAD ERROR: ' + headerPreview.src);
};
headerPreview.onload = function() {
alert('IMG LOADED OK');
if (headerWrapper) headerWrapper.style.display = 'block';
};
headerPreview.src = `${headerUrl}?t=${Date.now()}`;