/* IGI — Customer Dashboard */
function Dashboard({ navigate }) {
return (
Welcome back,
Ahmed Faraz Khan
);
}
function DashSidebar({ navigate }) {
const items = [
{ i: I.Home, l: 'Overview', active: true },
{ i: I.Shield, l: 'My policies', count: 4 },
{ i: I.FileText, l: 'My claims', count: 1 },
{ i: I.Download, l: 'Documents' },
{ i: I.CreditCard, l: 'Payments' },
{ i: I.User, l: 'Profile' },
{ i: I.Bell, l: 'Notifications' },
];
return (
AF
Ahmed Faraz
Member since 2019
{items.map(it => (
))}
);
}
function DashStats() {
const stats = [
{ l: 'Active policies', v: '4', s: '2 renewing this month', icon: I.Shield, c: 'var(--navy-800)' },
{ l: 'Total cover value', v: 'PKR 1.2 Cr', s: 'Across all policies', icon: I.TrendingUp, c: 'var(--success)' },
{ l: 'Open claims', v: '1', s: 'In progress · CLM-04621', icon: I.Clock, c: 'var(--warning)' },
{ l: 'No-claim discount', v: '35%', s: 'On motor renewal', icon: I.Award, c: 'var(--blue-700)' },
];
return (
);
}
function PoliciesList({ navigate }) {
const policies = [
{ id: 'POL-MTR-2024-78421', i: I.Car, t: 'Motor — Comprehensive Plus', sub: 'Toyota Corolla 2024 · BCG-1429', sum: 'PKR 45,00,000', expires: 'Jul 28, 2026', status: 'active' },
{ id: 'POL-HLT-2024-51290', i: I.Heart, t: 'Family Health Gold', sub: '4 members · Primary + Critical Care', sum: 'PKR 25,00,000', expires: 'Aug 14, 2026', status: 'active' },
{ id: 'POL-HOM-2024-22014', i: I.Home, t: 'Householder Comprehensive', sub: 'Defence Phase 6, Karachi', sum: 'PKR 50,00,000', expires: 'May 12, 2026', status: 'renewing' },
{ id: 'POL-TRV-2026-90043', i: I.Plane, t: 'Travel — Schengen', sub: '14-day cover · Single trip', sum: 'EUR 30,000', expires: 'May 19, 2026', status: 'active' },
];
return (
My policies
{policies.map((p, i) => (
{p.status === 'renewing' ? (
) : (
)}
))}
);
}
function RecentActivity() {
const acts = [
{ i: I.FileText, l: 'Claim CLM-2026-04621 estimate approved', d: 'PKR 187,400 · May 6, 04:20 PM', c: 'var(--success)' },
{ i: I.CreditCard, l: 'Premium installment paid', d: 'PKR 8,200 · Health Gold · May 1', c: 'var(--blue-700)' },
{ i: I.Download, l: 'Policy document downloaded', d: 'POL-MTR-2024-78421 · April 28', c: 'var(--ink-500)' },
{ i: I.Bell, l: 'Householder policy renewing in 4 days', d: 'POL-HOM-2024-22014 · April 27', c: 'var(--warning)' },
];
return (
Recent activity
{acts.map((a, i) => (
))}
);
}
window.Dashboard = Dashboard;