/* ============================================================ * DEMO MODAL — Preview funcional del panel Blackstock * * Se monta como overlay encima de la landing. * Datos demo realistas (no reales) que ilustran el panel: * Dashboard, Pedidos, Restocker, Smart Agent, Etiquetas, * Inventario, Productos, Contabilidad, IA Inbox, Multicuenta. * * Uso: window.bsOpenDemo() / window.bsCloseDemo() * ============================================================ */ const BsDemoModal = () => { const [open, setOpen] = React.useState(false); const [tab, setTab] = React.useState('dashboard'); React.useEffect(() => { window.bsOpenDemo = (initialTab) => { if (typeof initialTab === 'string') setTab(initialTab); setOpen(true); }; window.bsCloseDemo = () => setOpen(false); return () => { delete window.bsOpenDemo; delete window.bsCloseDemo; }; }, []); React.useEffect(() => { if (!open) return; const onKey = (e) => { if (e.key === 'Escape') setOpen(false); }; document.addEventListener('keydown', onKey); const prevOverflow = document.body.style.overflow; document.body.style.overflow = 'hidden'; return () => { document.removeEventListener('keydown', onKey); document.body.style.overflow = prevOverflow; }; }, [open]); if (!open) return null; const TABS = [ { id: 'dashboard', label: 'Dashboard', icon: 'M3 12h4l3-9 4 18 3-9h4' }, { id: 'pedidos', label: 'Pedidos', icon: 'M3 7h18M3 12h18M3 17h18' }, { id: 'restocker', label: 'Restocker', icon: 'M21 12a9 9 0 1 1-3-6.7L21 8V3M21 12h-5' }, { id: 'smart', label: 'Smart Agent', icon: 'M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1' }, { id: 'labels', label: 'Etiquetas', icon: 'M3 5a2 2 0 0 1 2-2h7l9 9-7 7-9-9V5z M7 9.5h.01' }, { id: 'inventario', label: 'Inventario', icon: 'M3 9h18M3 15h18M5 5h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z' }, { id: 'inbox', label: 'IA Inbox', icon: 'M22 12h-6l-2 3h-4l-2-3H2 M5.5 5h13l3.5 7v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-6l3.5-7z' }, { id: 'contabilidad', label: 'Contabilidad', icon: 'M12 1v22M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6' }, { id: 'multicuenta', label: 'Multicuenta', icon: 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z M23 21v-2a4 4 0 0 0-3-3.87 M16 3.13a4 4 0 0 1 0 7.75' }, ]; return (
{ if (e.target === e.currentTarget) setOpen(false); }}>
{tab === 'dashboard' && } {tab === 'pedidos' && } {tab === 'restocker' && } {tab === 'smart' && } {tab === 'labels' && } {tab === 'inventario' && } {tab === 'inbox' && } {tab === 'contabilidad' && } {tab === 'multicuenta' && }
); }; const DemoH = ({ title, sub, badge }) => ( <>

{title}

{badge && ( {badge} )}
{sub &&

{sub}

} ); const KPI = ({ label, value, delta, neg }) => (
{label}
{value}
{delta && (
{delta}
)}
); /* --- DASHBOARD --- */ const DemoDashboard = () => ( <>

Ingresos últimos 14 días 2.140€ total

Top productos

Carhartt Detroit jacket M4 ud
Acne scarf wool3 ud
Birkenstock Boston 423 ud
Stüssy 8-Ball 90s2 ud
Levi's 501 MIUSA W322 ud

Actividad reciente

Restocker re-publicó Carhartt Detroit M en @archive.dpt AUTO
Smart Agent respondió a 3 ofertas (aceptadas: 1) AUTO
Etiqueta generada para pedido #BS-1284 ENVIADO
Stock crítico: Acne scarf wool (1 ud) ALERTA
); /* --- PEDIDOS --- */ const DemoPedidos = () => { const orders = [ { id: 'BS-1284', acc: 'archive.dpt', client: 'Aitana V.', prod: 'Carhartt Detroit jacket M', total: '92€', status: 'ship', label: 'ENVIADO' }, { id: 'BS-1283', acc: 'archive.dpt', client: 'Iker S.', prod: 'Acne scarf wool', total: '78€', status: 'ok', label: 'PAGADO' }, { id: 'BS-1282', acc: 'nordic.studio', client: 'Marina C.', prod: 'Birkenstock Boston 42', total: '65€', status: 'wait', label: 'PENDIENTE' }, { id: 'BS-1281', acc: 'maison.eu', client: 'Pol M.', prod: 'Levi\'s 501 MIUSA W32', total: '54€', status: 'ship', label: 'ENVIADO' }, { id: 'BS-1280', acc: 'archive.dpt', client: 'Júlia R.', prod: 'Stüssy 8-Ball 90s', total: '48€', status: 'ok', label: 'PAGADO' }, { id: 'BS-1279', acc: 'archive.dpt', client: 'Bruno F.', prod: 'Diesel archive denim 30', total: '62€', status: 'alert', label: 'INCIDENCIA' }, { id: 'BS-1278', acc: 'nordic.studio', client: 'Adrián L.', prod: 'Stüssy crewneck 90s', total: '54€', status: 'ship', label: 'ENVIADO' }, ]; return ( <>

Últimos pedidos

{orders.map(o => (
{o.id} {o.acc} {o.prod} {o.total} {o.label}
))}
); }; /* --- RESTOCKER --- */ const DemoRestocker = () => ( <>

Cola de re-listing

Carhartt Detroit jacket MEN COLA · 12m
Acne scarf woolPROGRAMADO 18:30
Birkenstock Boston 42PUBLICADO HACE 4m
Levi's 501 MIUSA W32EN COLA · 27m
Stüssy 8-Ball 90sPUBLICADO HACE 8m

Reglas activas

Re-listar cada 30 minON
Saltar si vendido en 24hON
Limitar 5 acciones / horaON
Pausar 02:00–07:00ON
Aleatorizar tiempo ±4mON
); /* --- SMART AGENT --- */ const DemoSmart = () => ( <>

Conversación · pedido #BS-1284

CLIENTE · Aitana
Hola, ¿lo dejarías a 70€?
SMART AGENT · auto
¡Hola Aitana! A 70€ no me sale, lo mínimo serían 82€ con envío incluido. Es una pieza con poca rotación, espero ofertas hasta el viernes.
CLIENTE · Aitana
¿Y 78€?
SMART AGENT · auto
Cerramos en 80€ y va con seguimiento. Te lanzo la oferta ahora.

Reglas de negociación

Margen mínimo aceptado25%
Auto-aceptar ofertas ≥ 90% precioON
Contraofertar ofertas < 80%ON
TonoCercano
); /* --- LABELS --- */ const DemoLabels = () => ( <>

Últimas etiquetas

#BS-1284Correos ExpressDESCARGABLE
#BS-1283SEUR · NacionalDESCARGABLE
#BS-1282DHL ExpressGENERANDO
#BS-1281MRW · 24hDESCARGABLE
#BS-1280InPost LockersDESCARGABLE

Vista previa

BS-1284 · Correos Express
De: @archive.dpt
Para: Aitana V.
C/ Aribau 142, 08036 Barcelona
Peso: 0.6kg · Servicio: 48h
▌▌║▌▌║║▌║▌▌║▌║▌║║▌▌║▌║▌║▌
); /* --- INVENTARIO --- */ const DemoInventario = () => { const items = [ { name: 'Carhartt Detroit jacket M', stock: 4, max: 6, pct: 67, tone: '' }, { name: 'Acne scarf wool', stock: 1, max: 4, pct: 25, tone: 'crit' }, { name: 'Birkenstock Boston 42', stock: 2, max: 5, pct: 40, tone: 'warn' }, { name: 'Levi\'s 501 MIUSA W32', stock: 3, max: 5, pct: 60, tone: '' }, { name: 'Stüssy 8-Ball 90s', stock: 6, max: 8, pct: 75, tone: '' }, { name: 'Diesel archive denim 30', stock: 2, max: 5, pct: 40, tone: 'warn' }, { name: 'Salomon XT-6 41', stock: 0, max: 3, pct: 0, tone: 'crit' }, ]; return ( <>

Productos

{items.map((it) => (
{it.name}
{it.stock}/{it.max} {it.tone === 'crit' && CRÍTICO} {it.tone === 'warn' && BAJO} {!it.tone && OK}
))}
); }; /* --- INBOX --- */ const DemoInbox = () => ( <>

Bandeja unificada

Aitana V. · pregunta talla Carhartt Detroit — resumido por IA: cliente quiere confirmar M etiquetada RESPONDIDO
Iker S. · oferta 65€ por Acne scarf — auto-contraoferta a 78€ PENDIENTE REVISIÓN
Marina C. · pregunta tracking SEUR — resuelta con número de envío RESPONDIDO
Bruno F. · incidencia · paquete dañado — marcada como prioritaria URGENTE
Pol M. · valoración 5★ Levi's MIUSA — agradecido por IA RESPONDIDO
); /* --- CONTABILIDAD --- */ const DemoContabilidad = () => ( <>

Desglose de gastos

Coste mercancía2.140€
Comisiones plataforma360€
Envíos320€
IVA repercutido120€
Suscripciones40€

Por cuenta

archive.dpt+ 1.940€
nordic.studio+ 870€
maison.eu+ 450€
Total neto3.260€
); /* --- MULTICUENTA --- */ const DemoMulticuenta = () => ( <>

Cuentas conectadas

archive.dpt · cuenta principal · ES — vintage / archive 38 productos CONECTADA
nordic.studio · cuenta secundaria · FR/IT — basics premium 32 productos CONECTADA
maison.eu · drop fines de semana · ES — workwear 26 productos CONECTADA

Worker remoto · Cloud Worker

Tus cuentas operan desde nuestra infraestructura cloud, no desde tu ordenador. Restocker, Smart Agent y sincronización funcionan 24/7 aunque cierres el portátil.

Uptime · 30 días99.94%
IPs únicas por cuentaSI
Aislamiento de sesiónSI
); window.BsDemoModal = BsDemoModal;