#!/bin/bash echo "🚀 Starting Dynamic Events Population..." echo "This script will create events for all current VIPs using their actual IDs" echo "" cd "$(dirname "$0")" # Check if Node.js is available if ! command -v node &> /dev/null; then echo "❌ Node.js is not installed. Please install Node.js to run this script." exit 1 fi # Check if the backend is running echo "🔍 Checking if backend is running..." if curl -s http://localhost:3000/api/health > /dev/null; then echo "✅ Backend is running" else echo "❌ Backend is not running. Please start the backend first:" echo " cd vip-coordinator && docker-compose up -d" exit 1 fi # Run the dynamic events population script echo "" echo "📅 Running dynamic events population..." node populate-events-dynamic.js echo "" echo "✅ Dynamic events population script completed!" echo "" echo "🎯 Next steps:" echo "1. Visit http://localhost:5173/vips to see all VIPs" echo "2. Click on any VIP to view their populated schedule" echo "3. Check that driver names are displayed correctly" echo "4. Test the schedule management features"