From 87e38649c4dfee0f4e90b5ebf70c37395289dfe3 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sun, 1 Feb 2026 09:47:02 -0800 Subject: [PATCH] Use business name initial for user avatar instead of first name Co-Authored-By: Claude Opus 4.5 --- portal/portal.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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'; } },