BREAKING CHANGES: - Refactored monolithic manage.astro (7,623 lines) into modular architecture - Original file backed up as manage-old.astro NEW ARCHITECTURE: ✅ 5 Utility Libraries: - event-management.ts: Event data operations & formatting - ticket-management.ts: Ticket CRUD operations & sales data - seating-management.ts: Seating map management & layout generation - sales-analytics.ts: Sales metrics, reporting & data export - marketing-kit.ts: Marketing asset generation & social media ✅ 5 Shared Components: - TicketTypeModal.tsx: Reusable ticket type creation/editing - SeatingMapModal.tsx: Advanced seating map editor with drag-and-drop - EmbedCodeModal.tsx: Widget embedding with customization - OrdersTable.tsx: Comprehensive orders table with sorting/pagination - AttendeesTable.tsx: Attendee management with export capabilities ✅ 11 Tab Components: - TicketsTab.tsx: Ticket management with card/list views - VenueTab.tsx: Seating map management & venue configuration - OrdersTab.tsx: Sales data & order management - AttendeesTab.tsx: Attendee check-in & management - PresaleTab.tsx: Presale code generation & tracking - DiscountTab.tsx: Discount code management - AddonsTab.tsx: Add-on product management - PrintedTab.tsx: Printed ticket barcode management - SettingsTab.tsx: Event configuration & custom fields - MarketingTab.tsx: Marketing kit with social media templates - PromotionsTab.tsx: Campaign & promotion management ✅ 4 Infrastructure Components: - TabNavigation.tsx: Responsive tab navigation system - EventManagement.tsx: Main orchestration component - EventHeader.astro: Event information header - QuickStats.astro: Statistics dashboard BENEFITS: - 98.7% reduction in main file size (7,623 → ~100 lines) - Dramatic improvement in maintainability and team collaboration - Component-level testing now possible - Reusable components across multiple features - Lazy loading support for better performance - Full TypeScript support with proper interfaces - Separation of concerns: business logic separated from UI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
1.6 KiB
SQL
25 lines
1.6 KiB
SQL
-- Add referral tracking columns to purchase_attempts table
|
|
ALTER TABLE purchase_attempts
|
|
ADD COLUMN IF NOT EXISTS referral_source TEXT,
|
|
ADD COLUMN IF NOT EXISTS utm_campaign TEXT,
|
|
ADD COLUMN IF NOT EXISTS utm_medium TEXT,
|
|
ADD COLUMN IF NOT EXISTS utm_source TEXT,
|
|
ADD COLUMN IF NOT EXISTS utm_term TEXT,
|
|
ADD COLUMN IF NOT EXISTS utm_content TEXT,
|
|
ADD COLUMN IF NOT EXISTS referrer_url TEXT,
|
|
ADD COLUMN IF NOT EXISTS landing_page TEXT;
|
|
|
|
-- Add indexes for better query performance
|
|
CREATE INDEX IF NOT EXISTS idx_purchase_attempts_referral_source ON purchase_attempts(referral_source);
|
|
CREATE INDEX IF NOT EXISTS idx_purchase_attempts_utm_source ON purchase_attempts(utm_source);
|
|
CREATE INDEX IF NOT EXISTS idx_purchase_attempts_utm_campaign ON purchase_attempts(utm_campaign);
|
|
|
|
-- Add comments to explain the columns
|
|
COMMENT ON COLUMN purchase_attempts.referral_source IS 'High-level referral source (e.g., google, facebook, direct, email)';
|
|
COMMENT ON COLUMN purchase_attempts.utm_campaign IS 'Campaign name from UTM parameters';
|
|
COMMENT ON COLUMN purchase_attempts.utm_medium IS 'Medium from UTM parameters (e.g., email, social, paid)';
|
|
COMMENT ON COLUMN purchase_attempts.utm_source IS 'Source from UTM parameters (e.g., google, facebook, newsletter)';
|
|
COMMENT ON COLUMN purchase_attempts.utm_term IS 'Term from UTM parameters (paid search keywords)';
|
|
COMMENT ON COLUMN purchase_attempts.utm_content IS 'Content from UTM parameters (ad variant)';
|
|
COMMENT ON COLUMN purchase_attempts.referrer_url IS 'Full HTTP referrer URL';
|
|
COMMENT ON COLUMN purchase_attempts.landing_page IS 'Page where user first landed on the site'; |