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:
2025-07-12 18:21:40 -06:00
parent a02d64a86c
commit 26a87d0d00
232 changed files with 33175 additions and 5365 deletions

View File

@@ -105,27 +105,31 @@ const { minimumAge = 18, eventTitle = "this event", onVerified = "onAgeVerified"
</div>
<script define:vars={{ minimumAge, onVerified }}>
// Variables passed from define:vars
// minimumAge: number
// onVerified: string | undefined
class AgeVerification {
private modal: HTMLElement;
private dateInput: HTMLInputElement;
private confirmButton: HTMLButtonElement;
private errorDiv: HTMLElement;
private errorText: HTMLElement;
private coppaNotice: HTMLElement;
private isVerified: boolean = false;
modal;
dateInput;
confirmButton;
errorDiv;
errorText;
coppaNotice;
isVerified = false;
constructor() {
this.modal = document.getElementById('age-verification-modal')!;
this.dateInput = document.getElementById('date-of-birth') as HTMLInputElement;
this.confirmButton = document.getElementById('age-verification-confirm') as HTMLButtonElement;
this.errorDiv = document.getElementById('age-verification-error')!;
this.errorText = document.getElementById('age-verification-error-text')!;
this.coppaNotice = document.getElementById('coppa-notice')!;
this.modal = document.getElementById('age-verification-modal');
this.dateInput = document.getElementById('date-of-birth');
this.confirmButton = document.getElementById('age-verification-confirm');
this.errorDiv = document.getElementById('age-verification-error');
this.errorText = document.getElementById('age-verification-error-text');
this.coppaNotice = document.getElementById('coppa-notice');
this.bindEvents();
}
private bindEvents() {
bindEvents() {
// Date input change
this.dateInput.addEventListener('change', () => {
this.validateAge();
@@ -149,7 +153,7 @@ const { minimumAge = 18, eventTitle = "this event", onVerified = "onAgeVerified"
});
}
private validateAge() {
validateAge() {
this.hideError();
this.hideCoppaNotice();
@@ -187,7 +191,7 @@ const { minimumAge = 18, eventTitle = "this event", onVerified = "onAgeVerified"
this.confirmButton.disabled = false;
}
private confirmAge() {
confirmAge() {
if (this.confirmButton.disabled) return;
// Mark as verified
@@ -198,7 +202,7 @@ const { minimumAge = 18, eventTitle = "this event", onVerified = "onAgeVerified"
sessionStorage.setItem('age_verified_timestamp', Date.now().toString());
// Call the callback function if provided
if (typeof window[onVerified] === 'function') {
if (typeof onVerified === 'string' && typeof window[onVerified] === 'function') {
window[onVerified]();
}
@@ -211,24 +215,24 @@ const { minimumAge = 18, eventTitle = "this event", onVerified = "onAgeVerified"
}));
}
private showError(message: string) {
showError(message) {
this.errorText.textContent = message;
this.errorDiv.classList.remove('hidden');
}
private hideError() {
hideError() {
this.errorDiv.classList.add('hidden');
}
private showCoppaNotice() {
showCoppaNotice() {
this.coppaNotice.classList.remove('hidden');
}
private hideCoppaNotice() {
hideCoppaNotice() {
this.coppaNotice.classList.add('hidden');
}
public show() {
show() {
// Check if already verified in this session
const verified = sessionStorage.getItem('age_verified');
const timestamp = sessionStorage.getItem('age_verified_timestamp');
@@ -238,7 +242,7 @@ const { minimumAge = 18, eventTitle = "this event", onVerified = "onAgeVerified"
const verificationAge = Date.now() - parseInt(timestamp);
if (verificationAge < 60 * 60 * 1000) { // 1 hour
this.isVerified = true;
if (typeof window[onVerified] === 'function') {
if (typeof onVerified === 'string' && typeof window[onVerified] === 'function') {
window[onVerified]();
}
return;
@@ -254,20 +258,20 @@ const { minimumAge = 18, eventTitle = "this event", onVerified = "onAgeVerified"
}, 100);
}
public hide() {
hide() {
this.modal.style.display = 'none';
document.body.style.overflow = '';
}
public isAgeVerified(): boolean {
isAgeVerified() {
return this.isVerified;
}
}
// Initialize and expose globally
const ageVerification = new AgeVerification();
(window as any).ageVerification = ageVerification;
(window as any).showAgeVerification = () => ageVerification.show();
window.ageVerification = ageVerification;
window.showAgeVerification = () => ageVerification.show();
</script>
<style>