// Admin screens batch 2 — Catalog/Inventory, Customers, Promotions const Astyles2 = { fontFamily: 'Inter, -apple-system, system-ui, sans-serif' }; // ═════════════════════════════════════════════════════════════ // AD-4) CATALOG / INVENTORY // ═════════════════════════════════════════════════════════════ function AdminCatalog() { const products = [ { name: 'Metformin SR 500mg', brand: 'Glycomet-SR · USV', sku: '248-12', cat: 'Diabetes', price: 78, stock: 420, rx: true, hue: 'blue', status: 'Active', tone: 'mint' }, { name: 'Dolo 650', brand: 'Micro Labs', sku: '101-04', cat: 'Pain relief', price: 32, stock: 1240, rx: false, hue: 'mint', status: 'Active', tone: 'mint' }, { name: 'Azithromycin 500', brand: 'Azithral · Alembic', sku: '332-09', cat: 'Antibiotic', price: 92, stock: 18, rx: true, hue: 'amber', status: 'Low stock', tone: 'amber' }, { name: 'Vitamin D3 60K', brand: 'HealthKart', sku: '512-21', cat: 'Vitamins', price: 149, stock: 0, rx: false, hue: 'rose', status: 'Out of stock', tone: 'rose' }, { name: 'Pan-D', brand: 'Alkem', sku: '208-77', cat: 'Digestive', price: 108, stock: 340, rx: true, hue: 'mint', status: 'Active', tone: 'mint' }, { name: 'Cetirizine 10mg', brand: 'Cetzine · GSK', sku: '144-02', cat: 'Allergy', price: 24, stock: 89, rx: false, hue: 'blue', status: 'Active', tone: 'mint' }, { name: 'Atorvastatin 10', brand: 'Atorlip · Cipla', sku: '419-33', cat: 'Heart', price: 86, stock: 12, rx: true, hue: 'amber', status: 'Low stock', tone: 'amber' }, ]; return ( Add product}> {/* Summary cards */}
{[ { l: 'Total SKUs', v: '2,418', Icon: IconPill, hue: 'blue' }, { l: 'In stock', v: '2,408', Icon: IconCheck, hue: 'mint' }, { l: 'Low stock', v: '7', Icon: IconScan, hue: 'amber' }, { l: 'Out of stock', v: '3', Icon: IconClose, hue: 'rose' }, ].map((s, i) => { 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 } }; const p = palettes[s.hue]; return (
{s.v}
{s.l}
); })}
{/* Filters */}
{['All categories', 'Diabetes', 'Pain relief', 'Antibiotics', 'Vitamins'].map((f, i) => (
{f}
))}
Rx only
{/* Table */}
{['PRODUCT', 'SKU', 'CATEGORY', 'Rx', 'PRICE', 'STOCK', 'STATUS', ''].map((h, i) => ( ))} {products.map((p, i) => ( ))}
{h}
{p.name}
{p.brand}
{p.sku} {p.cat} {p.rx ? : } ₹{p.price} {p.stock}
Showing 1–7 of 2,418 products
{['‹', '1', '2', '3', '›'].map((p, i) => (
{p}
))}
); } // ═════════════════════════════════════════════════════════════ // AD-5) CUSTOMERS // ═════════════════════════════════════════════════════════════ function AdminCustomers() { const custs = [ { name: 'Aarav Kumar', ph: '98••• 12•••', tier: 'Gold', tone: 'amber', orders: 24, spend: '14,820', last: 'Today', city: 'Indiranagar' }, { name: 'Meera Shah', ph: '99••• 03•••', tier: 'Silver', tone: 'gray', orders: 12, spend: '6,240', last: '2 days ago', city: 'Koramangala' }, { name: 'Rohit Nair', ph: '90••• 88•••', tier: 'Gold', tone: 'amber', orders: 41, spend: '28,100', last: 'Today', city: 'HSR Layout' }, { name: 'Sana Khan', ph: '70••• 45•••', tier: 'Bronze', tone: 'rose', orders: 4, spend: '1,820', last: '1 week ago', city: 'Whitefield' }, { name: 'Vikram Rao', ph: '88••• 12•••', tier: 'Gold', tone: 'amber', orders: 33, spend: '19,450', last: 'Today', city: 'Indiranagar' }, { name: 'Priya Das', ph: '96••• 77•••', tier: 'Silver', tone: 'gray', orders: 9, spend: '4,100', last: '3 days ago', city: 'Marathahalli' }, ]; return ( Export}> {/* Summary */}
{[ { l: 'Total customers', v: '48,210', d: '+340 this week', Icon: IconUser, hue: 'blue' }, { l: 'JANA+ members', v: '12,840', d: '27% of base', Icon: IconStar, hue: 'amber' }, { l: 'Repeat rate', v: '64%', d: '+3% MoM', Icon: IconHeart, hue: 'mint' }, { l: 'Avg lifetime value', v: '₹8,420', d: 'per customer', Icon: IconCart, hue: 'rose' }, ].map((s, i) => { 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 } }; const p = palettes[s.hue]; return (
{s.v}
{s.l}
{s.d}
); })}
{/* Filters */}
{['All', 'Gold', 'Silver', 'Bronze', 'New', 'At risk'].map((f, i) => (
{f}
))}
{/* Table */}
{['CUSTOMER', 'TIER', 'ORDERS', 'TOTAL SPEND', 'LAST ORDER', 'LOCATION', ''].map((h, i) => ( ))} {custs.map((c, i) => { const init = c.name.split(' ').map(s => s[0]).join(''); const hues = [C.blue400, C.mint500, C.amber500, C.rose500, C.navy700, C.blue600]; return ( ); })}
{h}
{init}
{c.name}
{c.ph}
{c.orders} ₹{c.spend} {c.last} {c.city}
); } // ═════════════════════════════════════════════════════════════ // AD-6) PROMOTIONS / COUPONS // ═════════════════════════════════════════════════════════════ function AdminPromos() { const promos = [ { code: 'JAN20', desc: 'Flat 20% off first order', type: 'New users', used: '4,210', cap: '10,000', disc: '20%', status: 'Active', tone: 'mint', ends: 'Jun 30' }, { code: 'VIT20', desc: '20% off all vitamins', type: 'Category', used: '1,840', cap: '5,000', disc: '20%', status: 'Active', tone: 'mint', ends: 'Jun 02' }, { code: 'REFILL10', desc: '10% off subscription refills', type: 'Loyalty', used: '920', cap: '∞', disc: '10%', status: 'Active', tone: 'mint', ends: 'No expiry' }, { code: 'LABS499', desc: 'Full body checkup at ₹499', type: 'Lab tests', used: '2,100', cap: '3,000', disc: '₹1,001', status: 'Ending soon', tone: 'amber', ends: 'May 31' }, { code: 'MONSOON15', desc: '15% off cold & flu range', type: 'Seasonal', used: '0', cap: '8,000', disc: '15%', status: 'Scheduled', tone: 'blue', ends: 'Jul 15' }, { code: 'WELCOME50', desc: '₹50 off above ₹299', type: 'New users', used: '6,400', cap: '6,400', disc: '₹50', status: 'Exhausted', tone: 'rose', ends: 'Expired' }, ]; return ( Create coupon}> {/* Active campaign highlights */}
{[ { code: 'JAN20', tag: 'Top performer', redeemed: '4,210', rev: '₹8.4L', g: `linear-gradient(135deg, ${C.blue600}, ${C.navy800})`, light: true }, { code: 'VIT20', tag: 'Trending', redeemed: '1,840', rev: '₹3.1L', g: `linear-gradient(135deg, ${C.mint500}, #0F5A48)`, light: true }, { code: 'LABS499', tag: 'Ending soon', redeemed: '2,100', rev: '₹10.5L', g: `linear-gradient(135deg, ${C.amber500}, #B5740A)`, light: true }, ].map((c, i) => (
{c.tag}
{c.code}
{c.redeemed}
redeemed
{c.rev}
revenue
))}
{/* Table */}
All coupons
{['CODE', 'DESCRIPTION', 'TYPE', 'DISCOUNT', 'REDEEMED', 'ENDS', 'STATUS', ''].map((h, i) => ( ))} {promos.map((p, i) => ( ))}
{h}
{p.code} {p.desc} {p.type} {p.disc}
{p.used} / {p.cap}
{p.cap !== '∞' && p.cap !== '6,400' && (
)}
{p.ends} {/* toggle */}
); } Object.assign(window, { AdminCatalog, AdminCustomers, AdminPromos });