function MobileDashboard({ branchUser, onNavigate }) {
// Static demo data (using same pattern as desktop components)
const stats = branchUser ? [
{ label: 'Today\'s Sales', value: '₹12,450', change: '+8.2%', positive: true },
{ label: 'Stock Items', value: '245', change: '-3 items', positive: false },
{ label: 'Customers', value: '34', change: '+5 new', positive: true }
] : [
{ label: 'Total Branches', value: '8', change: '+2 this month', positive: true },
{ label: 'Total Revenue', value: '₹1,24,500', change: '+15.2%', positive: true },
{ label: 'Active Suppliers', value: '12', change: '2 new', positive: true }
];
return (
{/* Welcome Section */}
{branchUser ? `Welcome back, ${branchUser.name || 'Manager'}!` : 'Welcome to SalesPro'}
{branchUser ? 'Here\'s your branch overview for today' : 'Your business overview at a glance'}
{branchUser ? '🏪' : '📊'}
{/* Stats Grid */}
{stats.map((stat, index) => (
{stat.value}
{stat.label}
{stat.positive ? '↗️' : '↘️'}
{stat.change}
))}
{/* Quick Actions */}
{/* Recent Activity - Static demo data */}
Recent Activity
{[
{ icon: '🛒', title: 'New sale recorded', time: '2 min ago', amount: '₹2,450' },
{ icon: '📦', title: 'Stock updated', time: '15 min ago', amount: '45 items' },
{ icon: '👤', title: 'New customer added', time: '1 hour ago', amount: 'John Doe' }
].map((activity, index) => (
{activity.icon}
{activity.title}
{activity.time}
{activity.amount}
))}
);
}
// Register globally for the in-browser JSX loader
window.MobileDashboard = MobileDashboard;