const { useState, useEffect, useRef } = React;
// ═══════════════════════════════════════════════════════════
// DESIGN SYSTEM & ICONS
// ═══════════════════════════════════════════════════════════
const Icon = ({ name, size = 24, color = "currentColor" }) => {
const icons = {
logo: ,
home: ,
briefcase: ,
arrow_right: ,
search: ,
menu: ,
x: ,
bell: ,
user: ,
settings: ,
download: ,
check: ,
plus: ,
trash: ,
edit: ,
eye: ,
shield: ,
trendingUp: ,
users: ,
info: ,
calendar: ,
mapPin: ,
phone: ,
mail: ,
logOut: ,
chartBar: ,
checkCircle: ,
alertCircle: ,
};
return icons[name] || null;
};
// ═══════════════════════════════════════════════════════════
// HEADER COMPONENT
// ═══════════════════════════════════════════════════════════
const Header = ({ page, setPage, isLoggedIn, setIsLoggedIn, userType, userName }) => {
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const handleLogout = () => {
setIsLoggedIn(false);
setPage('home');
setMobileMenuOpen(false);
};
return (
setPage('home')}>
Premier Hospitality
{!isLoggedIn && (
)}
{isLoggedIn && (
{userName?.charAt(0)}
{userName}
{userType === 'admin' ? 'Admin' : 'Travel Company'}
)}
);
};
// ═══════════════════════════════════════════════════════════
// HOME PAGE
// ═══════════════════════════════════════════════════════════
const HomePage = ({ setPage }) => (
{/* Hero Section */}
Simplify Your Travel & MICE Operations
Connect with verified suppliers. Get competitive bids. Manage everything in one platform. Reduce costs by 30% while saving time.
{/* Features Section */}
Why Choose Premier Hospitality
The most efficient platform for travel companies and MICE professionals
{[
{ icon: 'briefcase', title: 'Easy RFP Management', desc: 'Post requirements and receive competitive bids in minutes' },
{ icon: 'users', title: 'Verified Suppliers', desc: 'Connect with quality hotels, transporters, and service providers' },
{ icon: 'trendingUp', title: 'Cost Savings', desc: 'Reduce operational costs through competitive bidding' },
{ icon: 'shield', title: 'Transparent Pricing', desc: 'Clear quotes with no hidden charges or surprises' },
{ icon: 'calendar', title: 'Real-time Tracking', desc: 'Monitor all your bookings and suppliers from one dashboard' },
{ icon: 'download', title: 'Instant Reports', desc: 'Export data and generate comprehensive reports instantly' },
].map((item, i) => (
))}
{/* How It Works */}
How It Works
Simple steps to connect suppliers and close deals
{[
{ step: '1', title: 'Post RFP', desc: 'Share your requirements and budget' },
{ step: '2', title: 'Get Quotes', desc: 'Suppliers submit competitive bids' },
{ step: '3', title: 'Compare', desc: 'Review and compare all proposals' },
{ step: '4', title: 'Book Now', desc: 'Confirm and manage your booking' },
].map((item, i) => (
{item.step}
{item.title}
{item.desc}
))}
{/* Testimonials */}
What Our Users Say
{[
{ name: 'Rajesh Kumar', company: 'Global Travels Inc.', quote: 'Saved 40% on supplier costs within first month.' },
{ name: 'Priya Sharma', company: 'Elite MICE Events', quote: 'Best platform for managing group travel logistics.' },
{ name: 'Amit Patel', company: 'Business Travel Solutions', quote: 'Transparent pricing and reliable partners.' },
].map((item, i) => (
{'★★★★★'.split('').map((s, i) => ★)}
"{item.quote}"
{item.name}
{item.company}
))}
);
// ═══════════════════════════════════════════════════════════
// AUTH PAGE (Login/Register)
// ═══════════════════════════════════════════════════════════
const AuthPage = ({ mode, setPage, setIsLoggedIn, setUserType, setUserName }) => {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [fullName, setFullName] = useState('');
const [company, setCompany] = useState('');
const [type, setType] = useState('client');
const [error, setError] = useState('');
const handleSubmit = (e) => {
e.preventDefault();
if (mode === 'login') {
if (!email || !password) {
setError('Please fill in all fields');
return;
}
setIsLoggedIn(true);
setUserType(type === 'supplier' ? 'supplier' : 'client');
setUserName(email.split('@')[0]);
setPage(type === 'supplier' ? 'supplier-dashboard' : 'client-dashboard');
} else {
if (!email || !password || !fullName || !company) {
setError('Please fill in all fields');
return;
}
setIsLoggedIn(true);
setUserType(type);
setUserName(fullName);
setPage(type === 'supplier' ? 'supplier-dashboard' : 'client-dashboard');
}
setError('');
};
return (
{mode === 'login' ? 'Welcome Back' : 'Create Account'}
{mode === 'login' ? 'Sign in to your account' : 'Join Premier Hospitality'}
{error &&
{error}
}
);
};
// ═══════════════════════════════════════════════════════════
// CLIENT DASHBOARD
// ═══════════════════════════════════════════════════════════
const ClientDashboard = ({ setPage, setIsLoggedIn, userName }) => {
const [activeTab, setActiveTab] = useState('overview');
const [rfps, setRfps] = useState([
{ id: 1, title: 'Delhi to Goa Corporate Trip', destination: 'Goa', status: 'active', quotes: 8, budget: '₹50,000 - ₹75,000' },
{ id: 2, title: 'Mumbai Conference Setup', destination: 'Mumbai', status: 'active', quotes: 5, budget: '₹100,000 - ₹150,000' },
{ id: 3, title: 'Bangalore Team Outing', destination: 'Bangalore', status: 'completed', quotes: 12, budget: '₹75,000 - ₹100,000' },
]);
const [quotes, setQuotes] = useState([
{ id: 1, rfp: 'Delhi to Goa Corporate Trip', supplier: 'Hotel Paradise Goa', amount: '₹65,000', status: 'pending' },
{ id: 2, rfp: 'Delhi to Goa Corporate Trip', supplier: 'Sunset Resorts', amount: '₹58,000', status: 'pending' },
{ id: 3, rfp: 'Delhi to Goa Corporate Trip', supplier: 'Beachfront Hotels', amount: '₹72,000', status: 'accepted' },
]);
const [bookings, setBookings] = useState([
{ id: 1, ref: 'BK001', supplier: 'Beachfront Hotels', amount: '₹72,000', status: 'confirmed', date: '15 May - 18 May 2026' },
{ id: 2, ref: 'BK002', supplier: 'Business Hotels India', amount: '₹125,000', status: 'in-progress', date: '20 May - 22 May 2026' },
]);
const [showNewRfpForm, setShowNewRfpForm] = useState(false);
const [newRfpData, setNewRfpData] = useState({ title: '', destination: '', pax: '', budget: '', requirements: '' });
const renderTab = () => {
switch (activeTab) {
case 'overview':
return (
Dashboard Overview
{[
{ label: 'Total RFPs', value: '12', icon: 'briefcase' },
{ label: 'Active Quotes', value: '8', icon: 'chartBar' },
{ label: 'Confirmed Bookings', value: '5', icon: 'checkCircle' },
{ label: 'Total Saved', value: '₹2,40,000', icon: 'trendingUp' },
].map((item, i) => (
{item.label}
{item.value}
))}
Recent RFPs
{rfps.slice(0, 2).map(rfp => (
{rfp.title}
{rfp.destination}
{rfp.status}
{rfp.quotes} quotes received
{rfp.budget}
))}
Top Suppliers
{[
{ name: 'Beachfront Hotels', rating: 4.8, reviews: 45 },
{ name: 'Business Hotels India', rating: 4.6, reviews: 32 },
{ name: 'Sunset Resorts', rating: 4.5, reviews: 28 },
].map((s, i) => (
{s.name}
{s.reviews} reviews
{s.rating}★
))}
);
case 'rfps':
return (
RFP Management
{showNewRfpForm && (
)}
{rfps.map(rfp => (
{rfp.title}
Location: {rfp.destination} • Budget: {rfp.budget}
{rfp.status}
{rfp.quotes} quotes received • Last updated 2 hours ago
))}
);
case 'quotes':
return (
Quotes Received
| RFP Title |
Supplier |
Quote Amount |
Status |
Action |
{quotes.map(quote => (
| {quote.rfp} |
{quote.supplier} |
{quote.amount} |
{quote.status}
|
|
))}
);
case 'bookings':
return (
Bookings
{bookings.map(booking => (
Booking Reference:
{booking.ref}
{booking.supplier}
{booking.date}
₹{booking.amount}
{booking.status}
))}
);
case 'profile':
return (
);
default:
return Coming soon...
;
}
};
return (
{/* Sidebar */}
Travel Company
{[
{ name: 'overview', label: 'Overview', icon: 'home' },
{ name: 'rfps', label: 'RFPs', icon: 'briefcase' },
{ name: 'quotes', label: 'Quotes', icon: 'chartBar' },
{ name: 'bookings', label: 'Bookings', icon: 'calendar' },
{ name: 'profile', label: 'Profile', icon: 'user' },
].map(item => (
setActiveTab(item.name)}>
{item.label}
))}
{/* Main Content */}
);
};
// ═══════════════════════════════════════════════════════════
// SUPPLIER DASHBOARD
// ═══════════════════════════════════════════════════════════
const SupplierDashboard = ({ setPage, setIsLoggedIn, userName }) => {
const [activeTab, setActiveTab] = useState('overview');
const [availableRfps, setAvailableRfps] = useState([
{ id: 1, title: 'Delhi to Goa Corporate Trip', destination: 'Goa', pax: 50, budget: '₹50,000 - ₹75,000', category: 'Hotel' },
{ id: 2, title: 'Mumbai Conference Setup', destination: 'Mumbai', pax: 100, budget: '₹100,000 - ₹150,000', category: 'Hotel' },
{ id: 3, title: 'Bangalore Team Outing', destination: 'Bangalore', pax: 30, budget: '₹75,000 - ₹100,000', category: 'Transport' },
]);
const [myQuotes, setMyQuotes] = useState([
{ id: 1, rfp: 'Delhi to Goa Corporate Trip', amount: '₹58,000', status: 'pending', date: '3 hours ago' },
{ id: 2, rfp: 'Mumbai Conference Setup', amount: '₹125,000', status: 'accepted', date: '1 day ago' },
{ id: 3, rfp: 'Previous Event', amount: '₹72,000', status: 'completed', date: '1 week ago' },
]);
const [supplyerBookings, setSupplierBookings] = useState([
{ id: 1, ref: 'BK001', client: 'Global Travels', amount: '₹72,000', status: 'confirmed', date: '15 May - 18 May 2026' },
{ id: 2, ref: 'BK002', client: 'Business Events', amount: '₹125,000', status: 'in-progress', date: '20 May - 22 May 2026' },
]);
const renderTab = () => {
switch (activeTab) {
case 'overview':
return (
Dashboard Overview
{[
{ label: 'Active Quotes', value: '8', icon: 'briefcase' },
{ label: 'Accepted Quotes', value: '3', icon: 'checkCircle' },
{ label: 'Confirmed Bookings', value: '12', icon: 'calendar' },
{ label: 'Revenue This Month', value: '₹5,80,000', icon: 'trendingUp' },
].map((item, i) => (
{item.label}
{item.value}
))}
Available Opportunities
{availableRfps.slice(0, 2).map(rfp => (
{rfp.title}
{rfp.destination} • {rfp.pax} pax
{rfp.category}
{rfp.budget}
))}
Performance Metrics
{[
{ label: 'Quote Success Rate', value: '75%' },
{ label: 'Average Rating', value: '4.7★' },
{ label: 'Response Time', value: '2.5 hrs' },
{ label: 'Completion Rate', value: '98%' },
].map((m, i) => (
))}
);
case 'opportunities':
return (
Available Opportunities
{availableRfps.map(rfp => (
{rfp.title}
📍 {rfp.destination}
👥 {rfp.pax} participants
💰 {rfp.budget}
{rfp.category}
))}
);
case 'quotes':
return (
My Quotes
| RFP Title |
Quote Amount |
Status |
Submitted |
Action |
{myQuotes.map(quote => (
| {quote.rfp} |
{quote.amount} |
{quote.status}
|
{quote.date} |
|
))}
);
case 'bookings':
return (
Confirmed Bookings
{supplyerBookings.map(booking => (
Booking Reference:
{booking.ref}
{booking.client}
{booking.date}
₹{booking.amount}
{booking.status}
))}
);
case 'profile':
return (
);
default:
return Coming soon...
;
}
};
return (
{/* Sidebar */}
Supplier
{[
{ name: 'overview', label: 'Overview', icon: 'home' },
{ name: 'opportunities', label: 'Opportunities', icon: 'briefcase' },
{ name: 'quotes', label: 'My Quotes', icon: 'chartBar' },
{ name: 'bookings', label: 'Bookings', icon: 'calendar' },
{ name: 'profile', label: 'Profile', icon: 'user' },
].map(item => (
setActiveTab(item.name)}>
{item.label}
))}
{/* Main Content */}
);
};
// ═══════════════════════════════════════════════════════════
// ADMIN DASHBOARD
// ═══════════════════════════════════════════════════════════
const AdminDashboard = ({ setPage, setIsLoggedIn, userName }) => {
const [activeTab, setActiveTab] = useState('overview');
const [allRfps, setAllRfps] = useState([
{ id: 1, client: 'Global Travels', title: 'Delhi to Goa Corporate Trip', destination: 'Goa', status: 'active', quotes: 8, budget: '₹50,000' },
{ id: 2, client: 'Business Events', title: 'Mumbai Conference Setup', destination: 'Mumbai', status: 'active', quotes: 5, budget: '₹100,000' },
{ id: 3, client: 'Elite Tours', title: 'Bangalore Team Outing', destination: 'Bangalore', status: 'completed', quotes: 12, budget: '₹75,000' },
]);
const [suppliers, setSuppliers] = useState([
{ id: 1, name: 'Hotel Paradise Goa', type: 'Hotel', city: 'Goa', verified: true, rating: 4.8, bookings: 45 },
{ id: 2, name: 'Business Hotels India', type: 'Hotel', city: 'Mumbai', verified: true, rating: 4.6, bookings: 32 },
{ id: 3, name: 'Express Transport', type: 'Transport', city: 'Delhi', verified: false, rating: 4.3, bookings: 18 },
]);
const renderTab = () => {
switch (activeTab) {
case 'overview':
return (
Platform Overview
{[
{ label: 'Total RFPs', value: '234', icon: 'briefcase' },
{ label: 'Active Suppliers', value: '87', icon: 'users' },
{ label: 'Total Revenue', value: '₹24.5M', icon: 'trendingUp' },
{ label: 'Success Rate', value: '94.2%', icon: 'checkCircle' },
].map((item, i) => (
{item.label}
{item.value}
))}
Recent RFPs
{allRfps.slice(0, 3).map(rfp => (
{rfp.quotes} quotes
{rfp.status}
))}
Top Performing Suppliers
{suppliers.filter(s => s.verified).slice(0, 3).map((s, i) => (
{s.name}
{s.rating}★
{s.bookings} bookings
))}
);
case 'rfps':
return (
All RFPs
| RFP Title |
Client |
Destination |
Budget |
Quotes |
Status |
Action |
{allRfps.map(rfp => (
| {rfp.title} |
{rfp.client} |
{rfp.destination} |
{rfp.budget} |
{rfp.quotes} |
{rfp.status} |
|
))}
);
case 'suppliers':
return (
Supplier Management
{suppliers.map(supplier => (
{supplier.name}
Type: {supplier.type}
Location: {supplier.city}
Bookings: {supplier.bookings}
{supplier.verified ? 'Verified' : 'Pending'}
{supplier.rating}★
{!supplier.verified && }
))}
);
case 'revenue':
return (
Revenue & Analytics
Monthly Revenue
₹24.5M
↑ 12% from last month
Commission Rate
15%
Recent Transactions
{[
{ id: 1, rfp: 'Delhi to Goa Trip', supplier: 'Hotel Paradise', amount: '₹72,000', date: 'Today' },
{ id: 2, rfp: 'Mumbai Conference', supplier: 'Business Hotels', amount: '₹125,000', date: 'Yesterday' },
{ id: 3, rfp: 'Bangalore Outing', supplier: 'Sunset Resorts', amount: '₹80,000', date: '2 days ago' },
].map(tx => (
{tx.rfp}
{tx.supplier} • {tx.date}
{tx.amount}
))}
);
case 'settings':
return (
);
default:
return Coming soon...
;
}
};
return (
{/* Sidebar */}
Admin Panel
{[
{ name: 'overview', label: 'Overview', icon: 'home' },
{ name: 'rfps', label: 'All RFPs', icon: 'briefcase' },
{ name: 'suppliers', label: 'Suppliers', icon: 'users' },
{ name: 'revenue', label: 'Revenue', icon: 'trendingUp' },
].map(item => (
setActiveTab(item.name)}>
{item.label}
))}
System
{[
{ name: 'settings', label: 'Settings', icon: 'settings' },
].map(item => (
setActiveTab(item.name)}>
{item.label}
))}
{/* Main Content */}
);
};
// ═══════════════════════════════════════════════════════════
// MAIN APP
// ═══════════════════════════════════════════════════════════
function App() {
const [page, setPage] = useState('home');
const [isLoggedIn, setIsLoggedIn] = useState(false);
const [userType, setUserType] = useState(null);
const [userName, setUserName] = useState('');
return (
{page === 'home' &&
}
{page === 'login' &&
}
{page === 'register' &&
}
{page === 'client-dashboard' && isLoggedIn &&
}
{page === 'supplier-dashboard' && isLoggedIn &&
}
{page === 'admin-dashboard' && isLoggedIn &&
}
);
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render();