diff --git a/portal/portal.js b/portal/portal.js index 8045ae2..f56c919 100644 --- a/portal/portal.js +++ b/portal/portal.js @@ -111,20 +111,22 @@ const Portal = { if (data.OK && data.BUSINESS) { const biz = data.BUSINESS; this.businessData = biz; // Store for later use - document.getElementById('businessName').textContent = biz.Name || 'Business'; - document.getElementById('businessAvatar').textContent = (biz.Name || 'B').charAt(0).toUpperCase(); - document.getElementById('userAvatar').textContent = (localStorage.getItem('payfrit_portal_firstname') || 'U').charAt(0).toUpperCase(); + const bizName = biz.Name || 'Business'; + const bizInitial = bizName.charAt(0).toUpperCase(); + document.getElementById('businessName').textContent = bizName; + document.getElementById('businessAvatar').textContent = bizInitial; + document.getElementById('userAvatar').textContent = bizInitial; } else { this.businessData = null; document.getElementById('businessName').textContent = 'Business #' + this.config.businessId; document.getElementById('businessAvatar').textContent = 'B'; - document.getElementById('userAvatar').textContent = (localStorage.getItem('payfrit_portal_firstname') || 'U').charAt(0).toUpperCase(); + document.getElementById('userAvatar').textContent = 'B'; } } catch (err) { console.error('[Portal] Business info error:', err); document.getElementById('businessName').textContent = 'Business #' + this.config.businessId; document.getElementById('businessAvatar').textContent = 'B'; - document.getElementById('userAvatar').textContent = (localStorage.getItem('payfrit_portal_firstname') || 'U').charAt(0).toUpperCase(); + document.getElementById('userAvatar').textContent = 'B'; } },