// Android screens 5-8: Cart, Checkout, Tracking, Profile const Aroboto2 = { fontFamily: 'Roboto, "Roboto Flex", system-ui, sans-serif' }; // ═════════════════════════════════════════════════════════════ // A5) CART (Material) // ═════════════════════════════════════════════════════════════ function MdScreenCart() { const items = [ { name: 'Metformin SR 500mg', sub: 'Strip of 30 · Rx', qty: 2, price: 78, mrp: 95, hue: 'blue' }, { name: 'Vitamin D3 60K IU', sub: '4 capsules', qty: 1, price: 149, mrp: 189, hue: 'amber' }, { name: 'Cetirizine 10mg', sub: 'Strip of 10 · Rx', qty: 1, price: 24, mrp: 32, hue: 'mint' }, ]; const subtotal = items.reduce((s, i) => s + i.price * i.qty, 0); const mrp = items.reduce((s, i) => s + i.mrp * i.qty, 0); return (
{/* Rx attached row */}
Rx attached · Dr_Mehta_Rx.jpg
Change
{/* Items - list cards stitched together */}
{items.map((p, i) => (
{p.name}
{p.sub}
{p.qty}
₹{p.price * p.qty} ₹{p.mrp * p.qty}
))}
{/* Add more — text button row */}
Add more items
{/* Coupon */}
You unlocked
JAN20 — Flat 20% off
Edit
{/* Bill summary */}
Bill summary
{[ ['MRP total', `₹${mrp}`, M.onSurfaceVariant], ['Discount', `−₹${mrp - subtotal}`, '#0F5A48'], ['Coupon (JAN20)', `−₹${Math.round(subtotal * 0.2)}`, '#0F5A48'], ['Delivery', 'FREE', '#0F5A48'], ].map(([k, v, col], i) => (
{k} {v}
))}
Total ₹{Math.round(subtotal * 0.8)}
You save ₹{mrp - Math.round(subtotal * 0.8)} on this order
{/* Bottom action bar */}
₹{Math.round(subtotal * 0.8)}
Save ₹{mrp - Math.round(subtotal * 0.8)}
Checkout
); } // ═════════════════════════════════════════════════════════════ // A6) CHECKOUT (Material) // ═════════════════════════════════════════════════════════════ function MdScreenCheckout() { return (
Home Default
Apt 4B, Maple Residency, 100ft Road, Indiranagar, Bengaluru 560038
Aarav · +91 98••• 12•••
{[ { label: 'Express', sub: '28 min', price: 'FREE', active: true }, { label: 'Today', sub: 'by 8 PM', price: 'FREE', active: false }, { label: 'Tomorrow', sub: '8–10 AM', price: '₹19', active: false }, ].map((s) => (
{s.label}
{s.sub}
{s.price}
))}
{[ { label: 'UPI · GPay', sub: 'aarav@oksbi · Recommended', Icon: IconCard, active: true, hue: M.primaryContainer, fg: M.onPrimaryContainer }, { label: 'HDFC Credit Card', sub: '•••• 4821 · Earn 12 pts', Icon: IconCard, active: false, hue: '#E2EAFA', fg: '#0B1F4D' }, { label: 'Cash on delivery', sub: 'Pay when you receive', Icon: IconCash, active: false, hue: '#D6F5EA', fg: '#0F5A48' }, { label: 'Health wallet', sub: 'Balance: ₹420', Icon: IconShield, active: false, hue: '#FFEFD1', fg: '#7A4500' }, ].map((m, i) => (
{m.label}
{m.sub}
{m.active &&
}
))}
{/* Bill */}
{[ ['Items (3)', '₹329', M.onSurfaceVariant], ['Discount + coupon', '−₹81', '#0F5A48'], ['Delivery', 'FREE', '#0F5A48'], ].map(([k, v, col], i) => (
{k} {v}
))}
Total ₹248
{/* Bottom CTA */}
Pay ₹248 securely
); } // ═════════════════════════════════════════════════════════════ // A7) TRACKING (Material) // ═════════════════════════════════════════════════════════════ function MdScreenTracking() { const steps = [ { label: 'Order confirmed', time: '5:42 PM', done: true }, { label: 'Pharmacist verified Rx', time: '5:48 PM', done: true }, { label: 'Packed at Indiranagar store', time: '5:55 PM', done: true, active: true }, { label: 'Out for delivery', time: 'Est 6:10 PM', done: false }, { label: 'Delivered', time: 'Est 6:40 PM', done: false }, ]; return (
{/* Map */}
ETA 28 min
{/* Origin pin */}
STORE
{/* Rider */}
{/* Destination */}
{/* Tracking sheet — Material bottom sheet */}
ORDER
#JN-2841-09
Packing now
{/* Rider card */}
RK
Rohit will deliver
4.9 ★ · 320 deliveries
{/* Timeline */}
{steps.map((s, i) => (
{s.done && }
{i < steps.length - 1 && (
)}
{s.label}
{s.time}
{s.active && ( ● Now )}
))}
Need help? View order
); } // ═════════════════════════════════════════════════════════════ // A8) PROFILE (Material) // ═════════════════════════════════════════════════════════════ function MdScreenProfile() { const refills = [ { name: 'Metformin SR 500mg', sub: 'Refill due in 3 days', progress: 88, hue: 'blue' }, { name: 'Atorvastatin 10mg', sub: 'Refill due in 9 days', progress: 65, hue: 'mint' }, { name: 'Vitamin D3 60K IU', sub: 'Refill due in 21 days', progress: 32, hue: 'amber' }, ]; return (
{/* Profile header card — large tonal */}
AK
Aarav Kumar
+91 98••• 12••• · 4 family members
{/* Loyalty */}
JANA+ Gold member
1,284 pts · ₹128 cashback
{/* Stats row */}
{[ { k: 'Orders', v: '24', Icon: IconBox }, { k: 'Rx saved', v: '6', Icon: IconRx }, { k: 'Total saved', v: '₹2,140', Icon: IconHeart }, ].map((s, i) => (
{s.v}
{s.k}
))}
{/* Refills */}
{refills.map((r, i) => (
{r.name}
{r.sub}
75 ? M.error : M.onSurface }}>{100 - r.progress}%
75 ? `linear-gradient(90deg, #F5A524, ${M.error})` : `linear-gradient(90deg, ${M.secondary}, ${M.primary})`, }}/>
))}
{/* Account list */}
{[ { label: 'Addresses', Icon: IconLoc, sub: '3 saved' }, { label: 'Payment methods', Icon: IconCard, sub: '2 cards · UPI' }, { label: 'Family health records', Icon: IconShield, sub: '4 members' }, { label: 'Help & support', Icon: IconBell, sub: '24×7 chat' }, { label: 'Sign out', Icon: IconClose, sub: '' }, ].map((m, i, a) => (
{m.label}
{m.sub &&
{m.sub}
}
))}
); } Object.assign(window, { MdScreenCart, MdScreenCheckout, MdScreenTracking, MdScreenProfile });