diff --git a/portal/menu-builder.html b/portal/menu-builder.html index 79411ec..048592b 100644 --- a/portal/menu-builder.html +++ b/portal/menu-builder.html @@ -3505,7 +3505,7 @@ if (data.OK) { if (data.ACTION === 'created') { // New menu — redirect to wizard to populate it - window.location.href = `${BASE_PATH}/portal/setup-wizard.html?businessId=${this.config.businessId}&menuId=${data.MENUID}`; + window.location.href = `${BASE_PATH}/portal/setup-wizard.html?businessId=${this.config.businessId}&menuId=${data.MENUID}&menuName=${encodeURIComponent(menuName)}`; return; } this.toast(`Menu ${data.ACTION}!`, 'success'); diff --git a/portal/setup-wizard.html b/portal/setup-wizard.html index 5c84729..edb88e6 100644 --- a/portal/setup-wizard.html +++ b/portal/setup-wizard.html @@ -837,7 +837,7 @@ -
Choose how this location participates.
@@ -1045,6 +1045,12 @@ initializeConfig(); setupUploadZone(); loadBusinessInfo(); + + // In add-menu mode, update the header to show the menu name + if (config.menuId && config.menuName) { + document.querySelector('.wizard-header h1').textContent = `Setup: ${config.menuName}`; + document.querySelector('.wizard-header p').textContent = 'Upload menu images or PDFs to extract categories, items, and modifiers for this menu.'; + } }); function initializeConfig() { @@ -1055,6 +1061,7 @@ config.businessId = paramBusinessId ? parseInt(paramBusinessId) : null; config.menuId = paramMenuId ? parseInt(paramMenuId) : null; + config.menuName = params.get('menuName') || null; // Determine API base URL const basePath = window.location.pathname.includes('/biz.payfrit.com/') @@ -2169,6 +2176,7 @@ if (config.menuId) { document.getElementById('menuNameInput').parentElement.style.display = 'none'; document.getElementById('menuStartTime').closest('.summary-stat').style.display = 'none'; + document.getElementById('communityMealCard').style.display = 'none'; } else { // Set default menu hours based on business hours (earliest open, latest close) const hoursSchedule = business.hoursSchedule || []; @@ -2186,7 +2194,9 @@ addMessage('ai', `Your menu is ready to save!
- ${config.menuId ? '' : `${business.name || 'Your Restaurant'}
`} + ${config.menuId && config.menuName + ? `Adding to: ${config.menuName}
` + : `${business.name || 'Your Restaurant'}
`}