Initial commit - Current state of vip-coordinator
This commit is contained in:
425
populate-test-data.js
Normal file
425
populate-test-data.js
Normal file
@@ -0,0 +1,425 @@
|
||||
// Script to populate VIP Coordinator with test data
|
||||
// All VIPs flying into Denver International Airport (DEN)
|
||||
|
||||
const API_BASE = 'http://localhost:3000/api';
|
||||
|
||||
// Function to add events and meetings for VIPs
|
||||
async function addEventsAndMeetings() {
|
||||
console.log('\nAdding Events and Meetings...');
|
||||
let successCount = 0;
|
||||
|
||||
// VIP 1 - Sarah Johnson
|
||||
let response = await fetch(`${API_BASE}/vips/1/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Arrival at DEN',
|
||||
location: 'Denver International Airport',
|
||||
startTime: '2025-06-26T09:00:00',
|
||||
endTime: '2025-06-26T10:00:00',
|
||||
type: 'transport',
|
||||
assignedDriverId: '1'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added arrival event for Sarah Johnson');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add arrival event for Sarah Johnson');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/1/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Meeting with CEO',
|
||||
location: 'Hyatt Regency Denver',
|
||||
startTime: '2025-06-26T11:00:00',
|
||||
endTime: '2025-06-26T12:30:00',
|
||||
type: 'meeting',
|
||||
assignedDriverId: '1'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added meeting event for Sarah Johnson');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add meeting event for Sarah Johnson');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/1/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Lunch with Board Members',
|
||||
location: 'Elway\'s Downtown',
|
||||
startTime: '2025-06-26T13:00:00',
|
||||
endTime: '2025-06-26T14:30:00',
|
||||
type: 'meal',
|
||||
assignedDriverId: '1'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added lunch event for Sarah Johnson');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add lunch event for Sarah Johnson');
|
||||
}
|
||||
|
||||
// VIP 2 - Michael Chen
|
||||
response = await fetch(`${API_BASE}/vips/2/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Arrival at DEN',
|
||||
location: 'Denver International Airport',
|
||||
startTime: '2025-06-26T10:00:00',
|
||||
endTime: '2025-06-26T11:00:00',
|
||||
type: 'transport',
|
||||
assignedDriverId: '2'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added arrival event for Michael Chen');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add arrival event for Michael Chen');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/2/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Meeting with Investors',
|
||||
location: 'Denver Marriott City Center',
|
||||
startTime: '2025-06-26T11:30:00',
|
||||
endTime: '2025-06-26T13:00:00',
|
||||
type: 'meeting',
|
||||
assignedDriverId: '2'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added meeting event for Michael Chen');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add meeting event for Michael Chen');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/2/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Lunch with Colleagues',
|
||||
location: 'Linger',
|
||||
startTime: '2025-06-26T13:30:00',
|
||||
endTime: '2025-06-26T15:00:00',
|
||||
type: 'meal',
|
||||
assignedDriverId: '2'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added lunch event for Michael Chen');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add lunch event for Michael Chen');
|
||||
}
|
||||
|
||||
// VIP 3 - Emily Rodriguez
|
||||
response = await fetch(`${API_BASE}/vips/3/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Arrival at DEN',
|
||||
location: 'Denver International Airport',
|
||||
startTime: '2025-06-27T09:00:00',
|
||||
endTime: '2025-06-27T10:00:00',
|
||||
type: 'transport',
|
||||
assignedDriverId: '3'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added arrival event for Emily Rodriguez');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add arrival event for Emily Rodriguez');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/3/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Meeting with Healthcare Partners',
|
||||
location: 'Denver Convention Center',
|
||||
startTime: '2025-06-27T10:30:00',
|
||||
endTime: '2025-06-27T12:00:00',
|
||||
type: 'meeting',
|
||||
assignedDriverId: '3'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added meeting event for Emily Rodriguez');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add meeting event for Emily Rodriguez');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/3/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Lunch with Healthcare Executives',
|
||||
location: 'Linger',
|
||||
startTime: '2025-06-27T12:30:00',
|
||||
endTime: '2025-06-27T14:00:00',
|
||||
type: 'meal',
|
||||
assignedDriverId: '3'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added lunch event for Emily Rodriguez');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add lunch event for Emily Rodriguez');
|
||||
}
|
||||
|
||||
// VIP 4 - David Thompson (self-driving)
|
||||
// No events needed
|
||||
|
||||
// VIP 5 - Lisa Wang
|
||||
response = await fetch(`${API_BASE}/vips/5/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Arrival at DEN',
|
||||
location: 'Denver International Airport',
|
||||
startTime: '2025-06-26T08:00:00',
|
||||
endTime: '2025-06-26T09:00:00',
|
||||
type: 'transport',
|
||||
assignedDriverId: '4'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added arrival event for Lisa Wang');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add arrival event for Lisa Wang');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/5/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Keynote Presentation',
|
||||
location: 'Denver Convention Center',
|
||||
startTime: '2025-06-26T10:00:00',
|
||||
endTime: '2025-06-26T11:30:00',
|
||||
type: 'event',
|
||||
assignedDriverId: '4'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added keynote event for Lisa Wang');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add keynote event for Lisa Wang');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/5/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Lunch with Conference Organizers',
|
||||
location: 'Elway\'s Downtown',
|
||||
startTime: '2025-06-26T12:00:00',
|
||||
endTime: '2025-06-26T13:30:00',
|
||||
type: 'meal',
|
||||
assignedDriverId: '4'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added lunch event for Lisa Wang');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add lunch event for Lisa Wang');
|
||||
}
|
||||
|
||||
// VIP 6 - Robert Martinez
|
||||
response = await fetch(`${API_BASE}/vips/6/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Arrival at DEN',
|
||||
location: 'Denver International Airport',
|
||||
startTime: '2025-06-27T10:00:00',
|
||||
endTime: '2025-06-27T11:00:00',
|
||||
type: 'transport',
|
||||
assignedDriverId: '5'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added arrival event for Robert Martinez');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add arrival event for Robert Martinez');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/6/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Meeting with Venture Capitalists',
|
||||
location: 'Denver Marriott City Center',
|
||||
startTime: '2025-06-27T11:30:00',
|
||||
endTime: '2025-06-27T13:00:00',
|
||||
type: 'meeting',
|
||||
assignedDriverId: '5'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added meeting event for Robert Martinez');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add meeting event for Robert Martinez');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/6/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Lunch with Startup Founders',
|
||||
location: 'Linger',
|
||||
startTime: '2025-06-27T13:30:00',
|
||||
endTime: '2025-06-27T15:00:00',
|
||||
type: 'meal',
|
||||
assignedDriverId: '5'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added lunch event for Robert Martinez');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add lunch event for Robert Martinez');
|
||||
}
|
||||
|
||||
// VIP 7 - Jennifer Adams
|
||||
response = await fetch(`${API_BASE}/vips/7/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Arrival at DEN',
|
||||
location: 'Denver International Airport',
|
||||
startTime: '2025-06-26T09:30:00',
|
||||
endTime: '2025-06-26T10:30:00',
|
||||
type: 'transport',
|
||||
assignedDriverId: '6'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added arrival event for Jennifer Adams');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add arrival event for Jennifer Adams');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/7/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Media Network Meeting',
|
||||
location: 'Denver Convention Center',
|
||||
startTime: '2025-06-26T11:00:00',
|
||||
endTime: '2025-06-26T12:30:00',
|
||||
type: 'meeting',
|
||||
assignedDriverId: '6'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added meeting event for Jennifer Adams');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add meeting event for Jennifer Adams');
|
||||
}
|
||||
|
||||
response = await fetch(`${API_BASE}/vips/7/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Lunch with Media Executives',
|
||||
location: 'Linger',
|
||||
startTime: '2025-06-26T13:00:00',
|
||||
endTime: '2025-06-26T14:30:00',
|
||||
type: 'meal',
|
||||
assignedDriverId: '6'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added lunch event for Jennifer Adams');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add lunch event for Jennifer Adams');
|
||||
}
|
||||
|
||||
// VIP 8 - James Wilson
|
||||
response = await fetch(`${API_BASE}/vips/8/schedule`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: 'Arrival at DEN',
|
||||
location: 'Denver International Airport',
|
||||
startTime: '2025-06-27T09:00:00',
|
||||
endTime: '2025-06-27T10:00:00',
|
||||
type: 'transport',
|
||||
assignedDriverId: '7'
|
||||
})
|
||||
});
|
||||
if (response.ok) {
|
||||
console.log(' ✅ Added arrival event for James Wilson');
|
||||
successCount++;
|
||||
} else {
|
||||
console.error(' ❌ Failed to add arrival event for James Wilson');
|
||||
}
|
||||
|
||||
console.log(`\nAdded ${successCount} events successfully`);
|
||||
}
|
||||
|
||||
// Main function
|
||||
async function populateTestData() {
|
||||
console.log('🚀 Starting to populate test data...\n');
|
||||
Reference in New Issue
Block a user