// ── CONFIGURACIÓN — Perfil, metas y preferencias ──────────────── const ConfigScreen = () => { const [user, setUser] = React.useState(null); const [form, setForm] = React.useState({ name:'', business_name:'', business_type:'', email:'', whatsapp:'', country:'', currency:'USD', avatar_url:'' }); const [loading, setLoading] = React.useState(true); const [saving, setSaving] = React.useState(false); const load = () => { setLoading(true); API.get('/me').then(r => { if (r) { setUser(r); setForm({ name: r.name || '', business_name: r.business_name || '', business_type: r.business_type || '', email: r.email || '', whatsapp: r.whatsapp || '', country: r.country || '', currency: r.currency || 'USD', avatar_url: r.avatar_url || '' }); } setLoading(false); }); }; React.useEffect(() => { load(); }, []); const save = async () => { setSaving(true); const res = await API.put('/me', form); setSaving(false); if (res.ok) { showToast('Perfil actualizado ✓'); // Actualizar el objeto global window.USER para que el sidebar se actualice if (window.USER) { window.USER = { ...window.USER, ...form }; } } else { showToast('Error al guardar', 'error'); } }; if (loading) return
Cargando configuración...
; const inputStyle = { width: '100%', padding: '12px 16px', borderRadius: 16, border: `1.5px solid ${EJ.border}`, fontSize: 14, outline: 'none', background: '#fff', color: EJ.body, transition: 'border-color 0.2s' }; return (
{/* PANEL IZQUIERDO: PERFIL */}
{form.name || 'Usuaria'}
{form.email}
✦ Ejecutora Pro
setForm(f => ({ ...f, name: e.target.value }))} />
setForm(f => ({ ...f, business_name: e.target.value }))} />
setForm(f => ({ ...f, whatsapp: e.target.value }))} />
setForm(f => ({ ...f, country: e.target.value }))} placeholder="Venezuela" />
{saving ? 'Guardando...' : 'Guardar configuración'}
{/* PANEL DERECHO: PLAN Y SUSCRIPCIÓN */}
Plan actual
Plan activo
✦ Ejecutora Pro
Acceso total · Templates · Mentoría · Software
Próxima facturación: 25 junio 2026
Gestionar suscripción
Niveles de La Rutina que Vende™
Esencial
5 módulos + 8 plantillas
$97
Pro IA ✦
Software + IA Copilot
$197
); }; Object.assign(window, { ConfigScreen });