This commit implements displaying lesson chapters/timeline as marketing content on the Product Detail page for bootcamp products, helping potential buyers understand the detailed breakdown of what they'll learn. ## Changes ### Product Detail Page (src/pages/ProductDetail.tsx) - Updated Lesson interface to include optional chapters property - Modified fetchCurriculum to fetch chapters along with lessons - Enhanced renderCurriculumPreview to display chapters as nested content under lessons - Chapters shown with timestamps and titles, clickable to navigate to bootcamp access page - Visual hierarchy: Module → Lesson → Chapters with proper indentation and styling ### Review System Fixes - Fixed review prompt re-appearing after submission (before admin approval) - Added hasSubmittedReview check to prevent showing prompt when review exists - Fixed edit review functionality to pre-populate form with existing data - ReviewModal now handles both INSERT (new) and UPDATE (edit) operations - Edit resets is_approved to false requiring re-approval ### Video Player Enhancements - Implemented Adilo/Video.js integration for M3U8/HLS playback - Added video progress tracking with refs pattern for reliability - Implemented chapter navigation for both Adilo and YouTube players - Added keyboard shortcuts (Space, Arrows, F, M, J, L) - Resume prompt for returning users with saved progress ### Database Migrations - Added Adilo video support fields (m3u8_url, mp4_url, video_host) - Created video_progress table for tracking user watch progress - Fixed consulting slots user_id foreign key - Added chapters support to products and bootcamp_lessons tables ### Documentation - Added Adilo implementation plan and quick reference docs - Cleaned up transcript analysis files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
38 lines
1.8 KiB
SQL
38 lines
1.8 KiB
SQL
-- Add Adilo video columns to products table (webinars)
|
|
ALTER TABLE products
|
|
ADD COLUMN IF NOT EXISTS m3u8_url TEXT,
|
|
ADD COLUMN IF NOT EXISTS mp4_url TEXT,
|
|
ADD COLUMN IF NOT EXISTS video_host TEXT DEFAULT 'youtube',
|
|
ADD COLUMN IF NOT EXISTS adilo_video_id TEXT;
|
|
|
|
-- Add Adilo video columns to bootcamp_lessons table
|
|
ALTER TABLE bootcamp_lessons
|
|
ADD COLUMN IF NOT EXISTS m3u8_url TEXT,
|
|
ADD COLUMN IF NOT EXISTS mp4_url TEXT,
|
|
ADD COLUMN IF NOT EXISTS video_host TEXT DEFAULT 'youtube',
|
|
ADD COLUMN IF NOT EXISTS adilo_video_id TEXT;
|
|
|
|
-- Add constraint to ensure valid video hosts
|
|
ALTER TABLE products
|
|
ADD CONSTRAINT products_video_host_check
|
|
CHECK (video_host IN ('youtube', 'adilo'));
|
|
|
|
ALTER TABLE bootcamp_lessons
|
|
ADD CONSTRAINT bootcamp_lessons_video_host_check
|
|
CHECK (video_host IN ('youtube', 'adilo'));
|
|
|
|
-- Create indexes for faster queries
|
|
CREATE INDEX IF NOT EXISTS idx_products_video_host ON products(video_host);
|
|
CREATE INDEX IF NOT EXISTS idx_bootcamp_lessons_video_host ON bootcamp_lessons(video_host);
|
|
|
|
-- Comments for documentation
|
|
COMMENT ON COLUMN products.m3u8_url IS 'M3U8 streaming URL from Adilo for HLS playback';
|
|
COMMENT ON COLUMN products.mp4_url IS 'MP4 fallback URL from Adilo for direct download/legacy browsers';
|
|
COMMENT ON COLUMN products.video_host IS 'Video hosting platform: youtube or adilo';
|
|
COMMENT ON COLUMN products.adilo_video_id IS 'Adilo video identifier for API reference';
|
|
|
|
COMMENT ON COLUMN bootcamp_lessons.m3u8_url IS 'M3U8 streaming URL from Adilo for HLS playback';
|
|
COMMENT ON COLUMN bootcamp_lessons.mp4_url IS 'MP4 fallback URL from Adilo for direct download/legacy browsers';
|
|
COMMENT ON COLUMN bootcamp_lessons.video_host IS 'Video hosting platform: youtube or adilo';
|
|
COMMENT ON COLUMN bootcamp_lessons.adilo_video_id IS 'Adilo video identifier for API reference';
|