// Web screens — batch 5: Categories, Order history, Order detail, Notifications
const Wstyles5 = { fontFamily: 'Inter, -apple-system, system-ui, sans-serif', color: C.ink900 };
// ═════════════════════════════════════════════════════════════
// W13) CATEGORIES (full directory)
// ═════════════════════════════════════════════════════════════
function WebCategories() {
const groups = [
{ h: 'Medicines', cats: [
{ l: 'Pain relief', c: 142, hue: 'blue', Icon: IconPill },
{ l: 'Diabetes care', c: 86, hue: 'mint', Icon: IconHeart },
{ l: 'Heart & BP', c: 64, hue: 'rose', Icon: IconRx },
{ l: 'Cold & flu', c: 58, hue: 'amber', Icon: IconShield },
{ l: 'Digestive', c: 47, hue: 'mint', Icon: IconPill },
{ l: 'Allergy', c: 39, hue: 'blue', Icon: IconShield },
]},
{ h: 'Wellness & nutrition', cats: [
{ l: 'Vitamins', c: 124, hue: 'amber', Icon: IconStar },
{ l: 'Skin care', c: 92, hue: 'rose', Icon: IconHeart },
{ l: 'Hair care', c: 68, hue: 'navy', Icon: IconUser },
{ l: 'Ayurveda', c: 102, hue: 'mint', Icon: IconStar },
{ l: 'Protein & fitness', c: 56, hue: 'blue', Icon: IconHeart },
{ l: 'Sexual wellness', c: 54, hue: 'navy', Icon: IconShield },
]},
{ h: 'Care & devices', cats: [
{ l: 'Baby & mom', c: 81, hue: 'rose', Icon: IconUser },
{ l: 'Elderly care', c: 44, hue: 'blue', Icon: IconShield },
{ l: 'Devices', c: 38, hue: 'navy', Icon: IconScan },
{ l: 'First aid', c: 29, hue: 'amber', Icon: IconShield },
]},
];
const palettes = {
blue: { bg: C.blue100, fg: C.blue600 }, mint: { bg: C.mint100, fg: C.mint500 },
amber: { bg: C.amber100, fg: C.amber500 }, rose: { bg: C.rose100, fg: C.rose500 }, navy: { bg: '#E2E8FA', fg: C.navy800 },
};
return (
Home › All categories
Shop by category
Over 24,000 products across 24 categories
{/* Featured banner */}
{[
{ t: 'Ayurveda store', s: '2,400+ curated herbal products', tag: 'NEW', g: `linear-gradient(135deg, ${C.mint100}, #B3EAD7)`, fg: '#0F5A48', Icon: IconStar },
{ t: 'Diabetes care hub', s: 'Monitors, strips, medicines & diets', tag: 'POPULAR', g: `linear-gradient(135deg, ${C.blue100}, #C5D7FF)`, fg: C.navy800, Icon: IconRx },
].map((b, i) => (
{b.tag}
{b.t}
{b.s}
))}
{/* Category groups */}
{groups.map((g, gi) => (
{g.h}
{g.cats.map(c => {
const p = palettes[c.hue];
return (
);
})}
))}
);
}
// ═════════════════════════════════════════════════════════════
// W14) ORDER HISTORY + DETAIL (split master-detail)
// ═════════════════════════════════════════════════════════════
function WebOrderHistory() {
const orders = [
{ id: '#JN-2841-09', date: 'Today, 5:42 PM', status: 'Packing', tone: 'blue', items: 3, total: 248, active: true },
{ id: '#JN-2812-06', date: 'May 24', status: 'Delivered', tone: 'mint', items: 2, total: 352 },
{ id: '#JN-2784-13', date: 'May 18', status: 'Delivered', tone: 'mint', items: 5, total: 1284 },
{ id: '#JN-2750-02', date: 'May 12', status: 'Refunded', tone: 'rose', items: 1, total: 95 },
{ id: '#JN-2701-08', date: 'May 04', status: 'Delivered', tone: 'mint', items: 4, total: 562 },
];
const tones = { blue: { bg: C.blue50, fg: C.blue600 }, mint: { bg: C.mint100, fg: '#0F5A48' }, rose: { bg: C.rose100, fg: '#7A1C1F' } };
return (
Account › My orders
My orders
{/* List */}
{['All', 'Active', 'Delivered', 'Refunded'].map((f, i) => (
{f}
))}
{orders.map((o, i) => {
const t = tones[o.tone];
return (
{o.date} · {o.items} items
₹{o.total}
);
})}
{/* Detail */}
{/* Header */}
#JN-2841-09
Placed today at 5:42 PM · 3 items
{/* Status timeline horizontal */}
{[
{ l: 'Confirmed', done: true },
{ l: 'Verified', done: true },
{ l: 'Packed', done: true, active: true },
{ l: 'Shipped', done: false },
{ l: 'Delivered', done: false },
].map((s, i, a) => (
{i < a.length - 1 && }
))}
{/* Items */}
Items in this order
{[
{ name: 'Metformin SR 500mg', sub: 'Strip of 30 · ×2', price: 156, hue: 'blue' },
{ name: 'Vitamin D3 60K IU', sub: '4 capsules · ×1', price: 149, hue: 'amber' },
{ name: 'Cetirizine 10mg', sub: 'Strip of 10 · ×1', price: 24, hue: 'mint' },
].map((p, i) => (
{p.name}
{p.sub}
Buy again →
₹{p.price}
))}
{/* Bill + address grid */}
Delivery address
Home
Apt 4B, Maple Residency, 100ft Road, Indiranagar, Bengaluru 560038
Bill summary
{[['Items', '₹329'], ['Discount', '−₹81', C.mint500], ['Delivery', 'FREE', C.mint500]].map(([k, v, col], i) => (
{k}
{v}
))}
Total paid
₹248
);
}
// ═════════════════════════════════════════════════════════════
// W15) NOTIFICATIONS / ACTIVITY
// ═════════════════════════════════════════════════════════════
function WebNotifications() {
const notifs = [
{ group: 'Today', items: [
{ title: 'Your order is being packed', sub: '#JN-2841-09 · 3 items · estimated delivery 6:40 PM', time: '5:55 PM', unread: true, Icon: IconBox, hue: 'blue' },
{ title: 'Prescription verified by Dr. P. Mehta', sub: '"Looks good. Refill safe to dispense."', time: '5:48 PM', unread: true, Icon: IconRx, hue: 'mint' },
{ title: 'Reminder: Time for Pan-D', sub: '1 capsule, 30 min before dinner', time: '6:30 PM', unread: false, Icon: IconClock, hue: 'amber' },
]},
{ group: 'Yesterday', items: [
{ title: '20% off on all vitamins this week', sub: 'Use code VIT20 at checkout · ends Sunday midnight', time: '11:24 AM', unread: false, Icon: IconStar, hue: 'amber' },
{ title: 'Time to refill Metformin SR 500mg', sub: 'Based on your last order, you have ~3 days of stock left', time: '9:00 AM', unread: false, Icon: IconRx, hue: 'blue' },
]},
{ group: 'This week', items: [
{ title: 'Dr. Priya replied to your follow-up', sub: '"Continue current dosage and review in 2 weeks."', time: 'Mon, 3:12 PM', unread: false, Icon: IconUser, hue: 'rose' },
{ title: 'Your lab report is ready', sub: 'HbA1c · CBC · download from Lab reports', time: 'Sun, 8:40 AM', unread: false, Icon: IconScan, hue: 'mint' },
]},
];
const palettes = { blue: { bg: C.blue50, fg: C.blue600 }, mint: { bg: C.mint100, fg: C.mint500 }, amber: { bg: C.amber100, fg: C.amber500 }, rose: { bg: C.rose100, fg: C.rose500 } };
return (
Notifications
2 unread · order updates, reminders & offers
Mark all as read
{/* Filter row */}
{['All', 'Orders', 'Reminders', 'Offers', 'Health'].map((f, i) => (
{f}
))}
{/* Groups */}
{notifs.map((g, gi) => (
{g.group.toUpperCase()}
{g.items.map((n, ni, a) => {
const p = palettes[n.hue];
return (
{n.title}
{n.unread && }
{n.sub}
{n.time}
);
})}
))}
);
}
Object.assign(window, { WebCategories, WebOrderHistory, WebNotifications });