#!/bin/bash echo "🚀 Quick Events Population for Current VIPs..." # Get current VIP IDs VIP_IDS=($(curl -s http://localhost:3000/api/vips | grep -o '"id":"[^"]*"' | sed 's/"id":"//' | sed 's/"//' | head -10)) DRIVER_IDS=($(curl -s http://localhost:3000/api/drivers | grep -o '"id":"[^"]*"' | sed 's/"id":"//' | sed 's/"//' | head -8)) echo "Found ${#VIP_IDS[@]} VIPs and ${#DRIVER_IDS[@]} drivers" # Function to add an event add_event() { local vip_id=$1 local title=$2 local location=$3 local start_time=$4 local end_time=$5 local type=$6 local driver_id=$7 local description=$8 curl -s -X POST "http://localhost:3000/api/vips/$vip_id/schedule" \ -H "Content-Type: application/json" \ -d "{ \"title\": \"$title\", \"location\": \"$location\", \"startTime\": \"$start_time\", \"endTime\": \"$end_time\", \"type\": \"$type\", \"assignedDriverId\": \"$driver_id\", \"description\": \"$description\" }" > /dev/null if [ $? -eq 0 ]; then echo "✅ Added: $title for VIP $vip_id" else echo "❌ Failed: $title for VIP $vip_id" fi } # Add events for first 5 VIPs for i in {0..4}; do if [ $i -lt ${#VIP_IDS[@]} ]; then vip_id=${VIP_IDS[$i]} driver_id=${DRIVER_IDS[$((i % ${#DRIVER_IDS[@]}))]} echo "" echo "📅 Creating events for VIP $vip_id with driver $driver_id..." # Airport arrival add_event "$vip_id" "Airport Arrival" "Denver International Airport" "2025-06-26T09:00:00" "2025-06-26T10:00:00" "transport" "$driver_id" "Airport pickup service" # Business meeting add_event "$vip_id" "Executive Meeting" "Denver Convention Center" "2025-06-26T11:00:00" "2025-06-26T12:30:00" "meeting" "$driver_id" "Strategic business meeting" # Lunch restaurants=("Elway's Downtown" "Linger" "Guard and Grace" "The Capital Grille" "Mercantile Dining") restaurant=${restaurants[$((i % ${#restaurants[@]}))]} add_event "$vip_id" "Business Lunch" "$restaurant" "2025-06-26T13:00:00" "2025-06-26T14:30:00" "meal" "$driver_id" "Fine dining experience" # Afternoon event add_event "$vip_id" "Presentation Session" "Denver Tech Center" "2025-06-26T15:00:00" "2025-06-26T16:30:00" "event" "$driver_id" "Professional presentation" # Evening event (for some VIPs) if [ $((i % 2)) -eq 0 ]; then add_event "$vip_id" "VIP Reception" "Four Seasons Hotel Denver" "2025-06-26T18:30:00" "2025-06-26T20:00:00" "event" "$driver_id" "Networking reception" fi sleep 0.2 # Small delay between VIPs fi done echo "" echo "✅ Quick events population completed!" echo "" echo "🎯 Next steps:" echo "1. Visit http://localhost:5173/vips" echo "2. Click on any VIP to see their schedule" echo "3. Verify driver names are showing correctly"