import { For } from 'solid-js'; import AdminShell from '~/components/AdminShell'; import { Eye, GripVertical, LayoutDashboard } from 'lucide-solid'; const kpis = [ { title: 'Total Users', value: '12,458', delta: '+12.5%', note: '+1,245 this month', tone: 'up' as const, icon: 'users' as const }, { title: 'Active Companies', value: '1,234', delta: '+8.2%', note: '+94 this month', tone: 'up' as const, icon: 'building' as const }, { title: 'Open Leads', value: '847', delta: '-3.1%', note: '27 fewer than last month', tone: 'down' as const, icon: 'trend' as const }, { title: 'Credits Purchased', value: '₹45,890', delta: '+18.7%', note: '₹7,234 more this month', tone: 'up' as const, icon: 'card' as const }, ]; const trendSeries = [62, 70, 81, 75, 88, 102]; const revSeries = [42000, 48000, 55000, 51000, 62000, 69000]; const maxAmount = 80000; const recentLeads = [ { title: 'Website Redesign Project', customer: 'TechCorp Inc.', category: 'Developers', budget: '₹15,000', status: 'Active' }, { title: 'Corporate Event Photography', customer: 'EventMasters LLC', category: 'Photographer', budget: '₹3,500', status: 'Pending' }, { title: 'Marketing Campaign Design', customer: 'BrandHub Co.', category: 'Graphic Designer', budget: '₹8,200', status: 'Active' }, { title: 'Social Media Management', customer: 'GrowthStart', category: 'Social Media Manager', budget: '₹5,000', status: 'Negotiating' }, ]; function KpiIcon(props: { kind: 'users' | 'building' | 'trend' | 'card' }) { if (props.kind === 'users') { return ( ); } if (props.kind === 'building') { return ( ); } if (props.kind === 'trend') { return ( ); } return ( ); } function DragHandle() { return ( ); } export default function AdminHomePage() { return (
{/* Page header */}

Overview

Dashboard

Welcome back — here's what's happening on your platform today.

{/* KPI cards */}
{(item) => (
{/* top accent */}
{/* icon box */}
{/* delta badge */} {item.tone === 'up' ? '↑' : '↓'} {item.delta.replace(/^[+-]/, '')}

{item.title}

{item.value}

{item.note}

)}
{/* Chart widgets */}
{/* Leads Trend */}

Leads Trend

Monthly leads performance

120 90 60 30 0
{() =>
}
{(m) => {m}}
Total Leads Converted
{/* Revenue Overview */}

Revenue Overview

Monthly revenue vs expenses

80k 60k 40k 20k 0
{() =>
}
{(value) => (
)}
{(m) => {m}}
Revenue Expenses
{/* Recent Leads widget */}

Recent Leads

Latest customer inquiries and opportunities

{(lead) => ( )}
Lead Title Customer Category Budget Status Action
{lead.title} {lead.customer} {lead.category} {lead.budget} {lead.status}
); }