// Super Admin screens — Platform overview, Feature Control Center, Stores, Plans & roles const SAstyles = { fontFamily: 'Inter, -apple-system, system-ui, sans-serif' }; // ═════════════════════════════════════════════════════════════ // SA-1) PLATFORM OVERVIEW // ═════════════════════════════════════════════════════════════ function SuperOverview() { const kpis = [ { l: 'Network GMV (MTD)', v: '₹18.4 Cr', d: '+22%', up: true, Icon: IconStar }, { l: 'Active stores', v: '142', d: '+6 this month', up: true, Icon: IconLoc }, { l: 'Orders (today)', v: '48,210', d: '+11%', up: true, Icon: IconBox }, { l: 'Platform uptime', v: '99.98%', d: '30-day', up: true, Icon: IconShield }, ]; const stores = [ { name: 'Indiranagar', city: 'Bengaluru', gmv: '₹52.4L', orders: 9840, status: 'Live', tone: 'mint' }, { name: 'Bandra West', city: 'Mumbai', gmv: '₹61.2L', orders: 11200, status: 'Live', tone: 'mint' }, { name: 'Connaught Place', city: 'Delhi', gmv: '₹48.9L', orders: 8900, status: 'Live', tone: 'mint' }, { name: 'Banjara Hills', city: 'Hyderabad', gmv: '₹38.1L', orders: 7100, status: 'Degraded', tone: 'amber' }, { name: 'Salt Lake', city: 'Kolkata', gmv: '₹0', orders: 0, status: 'Onboarding', tone: 'blue' }, ]; return ( Add store}>
{kpis.map((k, i) => (
▲ {k.d}
{k.v}
{k.l}
))}
{/* GMV by region bars + feature adoption */}
GMV by city · last 7 days
Feature adoption
{[ { l: 'Express delivery', p: 92, c: C.mint500 }, { l: 'Doctor consults', p: 68, c: SA.accent }, { l: 'Lab tests', p: 54, c: C.blue600 }, { l: 'Subscriptions', p: 31, c: C.amber500 }, ].map((r, i) => (
{r.l} {r.p}%
of {142} stores enabled
))}
{/* Stores table */}
Top stores
All 142 stores →
{['STORE', 'CITY', 'GMV (MTD)', 'ORDERS', 'STATUS', ''].map((h, i) => ( ))} {stores.map((s, i) => ( ))}
{h}
{s.name} {s.city} {s.gmv} {s.orders.toLocaleString()}
); } // ═════════════════════════════════════════════════════════════ // SA-2) FEATURE CONTROL CENTER ★ the main ask // ═════════════════════════════════════════════════════════════ function SuperFeatures() { const groups = [ { h: 'Storefront', Icon: IconHome, feats: [ { l: 'Mobile apps (iOS / Android)', d: 'Customer-facing native apps', on: true, status: 'Live', tone: 'mint', rollout: 100 }, { l: 'Web storefront', d: 'Desktop & responsive web shop', on: true, status: 'Live', tone: 'mint', rollout: 100 }, { l: 'Voice & barcode search', d: 'Mic input and scan-to-search', on: true, status: 'Live', tone: 'mint', rollout: 88 }, { l: 'AI symptom checker', d: 'Suggests OTC products from symptoms', on: false, status: 'Off', tone: 'gray', rollout: 0 }, ]}, { h: 'Commerce', Icon: IconCart, feats: [ { l: 'Express delivery (28 min)', d: 'Hyperlocal rider dispatch', on: true, status: 'Live', tone: 'mint', rollout: 92 }, { l: 'Subscriptions & auto-refill', d: 'Recurring medicine orders', on: true, status: 'Beta', tone: 'amber', rollout: 31 }, { l: 'Generic substitution', d: 'Suggest cheaper equivalents', on: true, status: 'Live', tone: 'mint', rollout: 76 }, { l: 'Buy-now-pay-later', d: 'Health EMI on orders > ₹2,000', on: false, status: 'Off', tone: 'gray', rollout: 0 }, ]}, { h: 'Health services', Icon: IconRx, feats: [ { l: 'Prescription upload & verify', d: 'Pharmacist review workflow', on: true, status: 'Live', tone: 'mint', rollout: 100 }, { l: 'Doctor consultations', d: 'Video / chat / audio consults', on: true, status: 'Live', tone: 'mint', rollout: 68 }, { l: 'Lab tests at home', d: 'Sample collection & reports', on: true, status: 'Live', tone: 'mint', rollout: 54 }, { l: 'Medicine reminders', d: 'Dose schedule & adherence', on: true, status: 'Live', tone: 'mint', rollout: 82 }, ]}, { h: 'Payments', Icon: IconCard, feats: [ { l: 'UPI', d: 'GPay, PhonePe, Paytm, BHIM', on: true, status: 'Live', tone: 'mint', rollout: 100 }, { l: 'Cards & netbanking', d: 'Credit / debit / NB', on: true, status: 'Live', tone: 'mint', rollout: 100 }, { l: 'Cash on delivery', d: 'For orders under ₹2,000', on: true, status: 'Live', tone: 'mint', rollout: 96 }, { l: 'Health wallet & cashback', d: 'Store credit & refunds', on: false, status: 'Paused', tone: 'rose', rollout: 0 }, ]}, { h: 'Engagement', Icon: IconStar, feats: [ { l: 'JANA+ loyalty program', d: 'Points, tiers & cashback', on: true, status: 'Live', tone: 'mint', rollout: 100 }, { l: 'Coupons & promotions', d: 'Discount codes & campaigns', on: true, status: 'Live', tone: 'mint', rollout: 100 }, { l: 'Push & WhatsApp notifications', d: 'Order & reminder alerts', on: true, status: 'Live', tone: 'mint', rollout: 94 }, { l: 'Referral program', d: 'Refer & earn credits', on: false, status: 'Off', tone: 'gray', rollout: 0 }, ]}, ]; return (
Kill switch
}> {/* Scope selector */}
APPLY TO
{[{ l: 'All stores (142)', on: true }, { l: 'By region', on: false }, { l: 'Single store', on: false }].map((s, i) => (
{s.l}
))}
Changes apply instantly & are logged to the audit trail
{/* Feature groups */}
{groups.map((g, gi) => (
{g.h}
{g.feats.filter(f => f.on).length}/{g.feats.length} on
{g.feats.map((f, fi) => (
{f.l}
{f.d}
{/* rollout */}
ROLLOUT{f.rollout}%
Config
))}
))}
); } // ═════════════════════════════════════════════════════════════ // SA-3) STORES & TENANTS // ═════════════════════════════════════════════════════════════ function SuperStores() { const stores = [ { name: 'Indiranagar', city: 'Bengaluru', plan: 'Enterprise', tone: 'blue', gmv: '₹52.4L', feats: 20, status: 'Live', sTone: 'mint' }, { name: 'Bandra West', city: 'Mumbai', plan: 'Enterprise', tone: 'blue', gmv: '₹61.2L', feats: 22, status: 'Live', sTone: 'mint' }, { name: 'Connaught Place', city: 'Delhi', plan: 'Growth', tone: 'amber', gmv: '₹48.9L', feats: 16, status: 'Live', sTone: 'mint' }, { name: 'Banjara Hills', city: 'Hyderabad', plan: 'Growth', tone: 'amber', gmv: '₹38.1L', feats: 16, status: 'Degraded', sTone: 'amber' }, { name: 'Koregaon Park', city: 'Pune', plan: 'Starter', tone: 'gray', gmv: '₹22.4L', feats: 11, status: 'Live', sTone: 'mint' }, { name: 'Salt Lake', city: 'Kolkata', plan: 'Starter', tone: 'gray', gmv: '₹0', feats: 8, status: 'Onboarding', sTone: 'blue' }, { name: 'Anna Nagar', city: 'Chennai', plan: 'Growth', tone: 'amber', gmv: '₹41.8L', feats: 17, status: 'Live', sTone: 'mint' }, ]; return ( Onboard store}>
{['All (142)', 'Enterprise (28)', 'Growth (64)', 'Starter (50)', 'Onboarding (4)'].map((f, i) => (
{f}
))}
{['STORE', 'CITY', 'PLAN', 'GMV (MTD)', 'FEATURES ON', 'STATUS', ''].map((h, i) => ( ))} {stores.map((s, i) => ( ))}
{h}
{s.name}
{s.city} {s.gmv} {s.feats} / 22 Manage →
); } // ═════════════════════════════════════════════════════════════ // SA-4) PLANS & ROLES (access control) // ═════════════════════════════════════════════════════════════ function SuperPlans() { const plans = [ { name: 'Starter', price: '₹4,999', period: '/mo', stores: 50, tone: 'gray', feats: ['Web + mobile storefront', 'UPI & COD payments', 'Up to 1,000 SKUs', 'Basic analytics', 'Email support'] }, { name: 'Growth', price: '₹14,999', period: '/mo', stores: 64, tone: 'amber', popular: true, feats: ['Everything in Starter', 'Express delivery + dispatch', 'Doctor consults & lab tests', 'Loyalty & promotions', 'Priority support'] }, { name: 'Enterprise', price: 'Custom', period: '', stores: 28, tone: 'blue', feats: ['Everything in Growth', 'Subscriptions & BNPL', 'Multi-store management', 'API & integrations', 'Dedicated success manager'] }, ]; const roles = [ { role: 'Platform owner', users: 2, perms: 'Full access · all stores & billing', tone: 'rose' }, { role: 'Regional manager', users: 8, perms: 'Manage assigned stores & staff', tone: 'amber' }, { role: 'Store admin', users: 142, perms: 'Single-store operations & catalog', tone: 'blue' }, { role: 'Pharmacist', users: 420, perms: 'Rx verification & dispensing', tone: 'mint' }, { role: 'Support agent', users: 64, perms: 'Read-only orders & customer chat', tone: 'gray' }, ]; return ( {/* Plans */}
Subscription plans
{plans.map((p, i) => (
{p.popular &&
MOST POPULAR
}
{p.name}
{p.price} {p.period}
{p.stores} stores on this plan
{p.feats.map((f, fi) => (
{f}
))}
))}
{/* Roles */}
Roles & permissions
{['ROLE', 'USERS', 'PERMISSIONS', ''].map((h, i) => ( ))} {roles.map((r, i) => ( ))}
{h}
{r.role}
{r.users} {r.perms} Edit access →
); } Object.assign(window, { SuperOverview, SuperFeatures, SuperStores, SuperPlans });