feat: Complete platform enhancement with multi-tenant architecture
Major additions: - Territory manager system with application workflow - Custom pricing and page builder with Craft.js - Enhanced Stripe Connect onboarding - CodeReadr QR scanning integration - Kiosk mode for venue sales - Super admin dashboard and analytics - MCP integration for AI-powered operations Infrastructure improvements: - Centralized API client and routing system - Enhanced authentication with organization context - Comprehensive theme management system - Advanced event management with custom tabs - Performance monitoring and accessibility features Database schema updates: - Territory management tables - Custom pages and pricing structures - Kiosk PIN system - Enhanced organization profiles - CodeReadr integration tables 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -261,7 +261,7 @@ import Layout from '../layouts/Layout.astro';
|
||||
small: { width: 300, height: 400 },
|
||||
medium: { width: 400, height: 500 },
|
||||
large: { width: 500, height: 600 }
|
||||
}[selectedSize];
|
||||
}[selectedSize] || { width: 400, height: 500 };
|
||||
|
||||
const embedScript = `<!-- Black Canyon Tickets Widget -->
|
||||
<div id="bct-widget-${selectedEvent.id}" style="width: ${dimensions.width}px; height: ${dimensions.height}px;"></div>
|
||||
@@ -283,7 +283,9 @@ import Layout from '../layouts/Layout.astro';
|
||||
</sc` + `ript>
|
||||
<!-- End Black Canyon Tickets Widget -->`;
|
||||
|
||||
embedCode.textContent = embedScript;
|
||||
if (embedCode) {
|
||||
embedCode.textContent = embedScript;
|
||||
}
|
||||
updatePreview();
|
||||
}
|
||||
|
||||
@@ -302,7 +304,7 @@ import Layout from '../layouts/Layout.astro';
|
||||
small: { width: 300, height: 400 },
|
||||
medium: { width: 400, height: 500 },
|
||||
large: { width: 500, height: 600 }
|
||||
}[selectedSize];
|
||||
}[selectedSize] || { width: 400, height: 500 };
|
||||
|
||||
// Create a simplified preview
|
||||
const previewHTML = `
|
||||
@@ -325,44 +327,56 @@ import Layout from '../layouts/Layout.astro';
|
||||
</div>
|
||||
`;
|
||||
|
||||
widgetPreview.innerHTML = previewHTML;
|
||||
if (widgetPreview) {
|
||||
widgetPreview.innerHTML = previewHTML;
|
||||
}
|
||||
}
|
||||
|
||||
// Event listeners
|
||||
eventSelect.addEventListener('change', (e) => {
|
||||
const selectedOption = e.target.options[e.target.selectedIndex];
|
||||
const target = e.target as HTMLSelectElement;
|
||||
if (!target) return;
|
||||
|
||||
const selectedOption = target.options[target.selectedIndex];
|
||||
if (selectedOption.value) {
|
||||
selectedEvent = JSON.parse(selectedOption.getAttribute('data-event'));
|
||||
widgetOptions.classList.remove('hidden');
|
||||
embedCodeSection.classList.remove('hidden');
|
||||
selectedEvent = JSON.parse(selectedOption.getAttribute('data-event') || '{}');
|
||||
widgetOptions?.classList.remove('hidden');
|
||||
embedCodeSection?.classList.remove('hidden');
|
||||
generateEmbedCode();
|
||||
} else {
|
||||
selectedEvent = null;
|
||||
widgetOptions.classList.add('hidden');
|
||||
embedCodeSection.classList.add('hidden');
|
||||
widgetOptions?.classList.add('hidden');
|
||||
embedCodeSection?.classList.add('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
// Listen for option changes
|
||||
document.addEventListener('change', (e) => {
|
||||
if (e.target.matches('input[name="size"], input[name="theme"], #show-branding')) {
|
||||
const target = e.target as HTMLElement;
|
||||
if (target && 'matches' in target && target.matches('input[name="size"], input[name="theme"], #show-branding')) {
|
||||
generateEmbedCode();
|
||||
}
|
||||
});
|
||||
|
||||
copyCodeBtn.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(embedCode.textContent).then(() => {
|
||||
const originalText = copyCodeBtn.textContent;
|
||||
copyCodeBtn.textContent = 'Copied!';
|
||||
copyCodeBtn.classList.add('bg-green-600');
|
||||
setTimeout(() => {
|
||||
copyCodeBtn.textContent = originalText;
|
||||
copyCodeBtn.classList.remove('bg-green-600');
|
||||
}, 2000);
|
||||
});
|
||||
copyCodeBtn?.addEventListener('click', () => {
|
||||
if (embedCode?.textContent) {
|
||||
navigator.clipboard.writeText(embedCode.textContent).then(() => {
|
||||
const originalText = copyCodeBtn?.textContent;
|
||||
if (copyCodeBtn) {
|
||||
copyCodeBtn.textContent = 'Copied!';
|
||||
copyCodeBtn.classList.add('bg-green-600');
|
||||
setTimeout(() => {
|
||||
if (copyCodeBtn && originalText) {
|
||||
copyCodeBtn.textContent = originalText;
|
||||
copyCodeBtn.classList.remove('bg-green-600');
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
testWidgetBtn.addEventListener('click', () => {
|
||||
testWidgetBtn?.addEventListener('click', () => {
|
||||
if (selectedEvent) {
|
||||
window.open(`/e/${selectedEvent.slug}`, '_blank');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user