// Web screens — Cart, Checkout, Account dashboard const Wstyles2 = { fontFamily: 'Inter, -apple-system, system-ui, sans-serif', color: C.ink900 }; // ═════════════════════════════════════════════════════════════ // W4) CART (full-page) // ═════════════════════════════════════════════════════════════ function WebCart() { const items = [ { name: 'Metformin SR 500mg', sub: 'Strip of 30 · Glycomet-SR', qty: 2, price: 78, mrp: 95, hue: 'blue', rx: true, stock: 'In stock', save: 17 }, { name: 'Vitamin D3 60K IU', sub: '4 capsules · Healthkart', qty: 1, price: 149, mrp: 189, hue: 'amber', rx: false, stock: 'In stock', save: 40 }, { name: 'Cetirizine 10mg', sub: 'Strip of 10 · Cetzine', qty: 1, price: 24, mrp: 32, hue: 'mint', rx: true, stock: 'In stock', save: 8 }, ]; const subtotal = items.reduce((s, i) => s + i.price * i.qty, 0); const mrp = items.reduce((s, i) => s + i.mrp * i.qty, 0); const couponSave = Math.round(subtotal * 0.2); const total = subtotal - couponSave; return (
Home Cart
Your cart ({items.length} items)
Continue shopping →
{/* Items + Rx + delivery */}
{/* Rx attached row */}
Prescription attached
Dr_Mehta_Rx.jpg · Verified by Dr. P. Mehta · 2 min ago
Verified
Replace
{/* Items list */}
Deliver all 3 items together
Today, by 6:40 PM
{items.map((p, i) => (
{p.name}
{p.sub}
₹{p.price * p.qty}
₹{p.mrp * p.qty}
{p.rx && Rx} ● {p.stock} Save ₹{p.save}/unit
{p.qty}
Save for later Remove
))}
{/* You might also need */}
Frequently bought together
{[ { name: 'Glucometer strips', price: 320, hue: 'blue' }, { name: 'Vit B-Complex', price: 245, hue: 'amber' }, { name: 'Pan-D 40mg', price: 108, hue: 'mint' }, { name: 'BP monitor', price: 1899, hue: 'navy' }, ].map((s, i) => (
{s.name}
₹{s.price} + Add
))}
{/* Summary column */}
{/* Coupon */}
%
JAN20 applied
Flat 20% off · saved ₹{couponSave}
Edit
{/* Bill */}
Bill summary
{[ ['MRP total', `₹${mrp}`], ['Product discount', `−₹${mrp - subtotal}`, C.mint500], ['Coupon (JAN20)', `−₹${couponSave}`, C.mint500], ['Delivery', 'FREE', C.mint500], ['Convenience fee', '₹0'], ].map(([k, v, col], i) => (
{k} {v}
))}
Total to pay ₹{total}
Total savings: ₹{mrp - total} 🎉
100% secure Easy returns
); } // ═════════════════════════════════════════════════════════════ // W5) CHECKOUT (3-step layout) // ═════════════════════════════════════════════════════════════ function WebCheckout() { return (
Checkout
Encrypted and secure
{/* Steps */}
{[ { l: 'Address', done: true }, { l: 'Delivery', done: true }, { l: 'Payment', active: true }, { l: 'Review', done: false }, ].map((s, i, a) => (
{s.done ? : i + 1}
{s.l}
{i < a.length - 1 &&
} ))}
{/* Delivery address — collapsed */}
Delivering to Aarav · Home
Apt 4B, Maple Residency, 100ft Road, Indiranagar, Bengaluru 560038 · +91 98••• 12•••
Change
{/* Delivery slot */}
Delivery slot
Express selected
{[ { l: 'Express', s: '28 min', p: 'FREE', active: true }, { l: 'Today', s: 'by 8 PM', p: 'FREE' }, { l: 'Tomorrow', s: '8–10 AM', p: '₹19' }, { l: 'Tomorrow', s: '6–8 PM', p: '₹19' }, ].map((s, i) => (
{s.l}
{s.s}
{s.p}
))}
{/* Payment */}
Payment method
Step 3 · in progress
{[ { l: 'UPI · GPay', sub: 'aarav@oksbi · Recommended', Icon: IconCard, active: true, hue: 'blue' }, { l: 'HDFC Credit Card', sub: '•••• 4821 · Earn 12 pts', Icon: IconCard, active: false, hue: 'navy' }, { l: 'Cash on delivery', sub: 'Pay when you receive', Icon: IconCash, active: false, hue: 'mint' }, { l: 'Health wallet', sub: 'Balance: ₹420', Icon: IconShield, active: false, hue: 'amber' }, ].map((m, i) => (
{m.l}
{m.sub}
{m.active &&
}
))}
{/* UPI ID input row (active) */}
UPI ID
aarav@oksbi
{/* Sticky summary */}
Order summary
{[ { name: 'Metformin SR 500mg', qty: 2, price: 156, hue: 'blue' }, { name: 'Vitamin D3 60K IU', qty: 1, price: 149, hue: 'amber' }, { name: 'Cetirizine 10mg', qty: 1, price: 24, hue: 'mint' }, ].map((p, i) => (
{p.name}
Qty {p.qty}
₹{p.price}
))}
{[ ['Items', '₹329'], ['Discount + coupon', '−₹81', C.mint500], ['Delivery', 'FREE', C.mint500], ].map(([k, v, col], i) => (
{k} {v}
))}
Total ₹248
By placing this order, you agree to our
Refund Policy and Terms
); } // ═════════════════════════════════════════════════════════════ // W6) ACCOUNT DASHBOARD // ═════════════════════════════════════════════════════════════ function WebAccount() { return (
{/* Sidebar */}
{/* Avatar */}
AK
Aarav Kumar
JANA+ Gold · 1,284 pts
{/* Nav */}
{[ { l: 'Overview', Icon: IconHome, on: true }, { l: 'My orders', Icon: IconBox, badge: '24' }, { l: 'Prescriptions', Icon: IconRx, badge: '6' }, { l: 'Refill tracker', Icon: IconClock }, { l: 'Lab reports', Icon: IconScan }, { l: 'Addresses', Icon: IconLoc, badge: '3' }, { l: 'Payment methods', Icon: IconCard }, { l: 'Family members', Icon: IconUser, badge: '4' }, { l: 'Wallet & rewards', Icon: IconStar }, ].map((m, i) => (
{m.l} {m.badge && {m.badge}}
))}
Sign out
{/* Main */}
Welcome back, Aarav 👋
Here's a quick look at your health account.
{/* Stat row */}
{[ { l: 'Active orders', v: '1', s: 'Arriving in 14 min', Icon: IconTruck, hue: 'blue', cta: 'Track' }, { l: 'Refills due', v: '3', s: 'Next: Metformin in 3d', Icon: IconRx, hue: 'amber', cta: 'Refill' }, { l: 'JANA+ points', v: '1,284', s: '₹128 cashback ready', Icon: IconStar, hue: 'mint', cta: 'Redeem' }, { l: 'Lifetime saved', v: '₹2,140', s: 'on 24 orders', Icon: IconHeart, hue: 'rose', cta: null }, ].map((s, i) => (
{s.cta && {s.cta} →}
{s.v}
{s.l}
{s.s}
))}
{/* Two columns */}
{/* Active order */}
Active order
All orders →
#JN-2841-09
3 items · Arriving by 6:40 PM
{/* Mini timeline */}
{[ { 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) => (
{s.l}
{i < a.length - 1 &&
} ))}
{/* Refills */}
Refill tracker
Manage
{[ { name: 'Metformin SR 500', d: '3 days', p: 88, urgent: true }, { name: 'Atorvastatin 10', d: '9 days', p: 65 }, { name: 'Vitamin D3', d: '21 days', p: 32 }, ].map((r, i) => (
{r.name} {r.d}
))}
{/* Recent orders + quick actions */}
Recent orders
View all
{[ { id: '#JN-2812-06', date: 'May 24', items: '2 items', total: '₹352', tone: 'mint', status: 'Delivered' }, { id: '#JN-2784-13', date: 'May 18', items: '5 items', total: '₹1,284', tone: 'mint', status: 'Delivered' }, { id: '#JN-2750-02', date: 'May 12', items: '1 item', total: '₹95', tone: 'rose', status: 'Refunded' }, ].map((o, i) => (
{o.id}
{o.date}
{o.items}
● {o.status}
{o.total}
))}
JANA+ GOLD
1,284
points · ₹128 cashback ready
Earn 2× points on lab tests this week
); } Object.assign(window, { WebCart, WebCheckout, WebAccount });