/* GestiFalla — Pantallas B: Tarjeta, Monedero, Eventos, Perfil */ /* ============================================================ TARJETA FALLERA — carnet digital (pantalla completa) ============================================================ */ function TarjetaScreen({ onBack, toast }) { const f = DATA.fallero; return (
toast('Compartiendo tarjeta…')}>} />
{/* Carnet */}
GestiFalla
{f.cargo}
{f.nombre}
{DATA.falla.nombre}
{/* Grid de datos */}
{[['Cargo', f.cargo], ['N.º JCF', f.jcf], ['Años fallero', String(f.anios)], ['Sección', f.seccion]].map((c, i) => (
{c[0]}
{c[1]}
))}
{/* QR row */}
Código de verificación
GF·{f.jcf}·{f.censo.replace('.', '')}
Válido ejercicio {DATA.falla.ejercicio}
{/* Insignias */}
{DATA.insignias.map((b, i) => (
{b.tipo}
{b.valor}
{b.sub}
))}
{/* Wallet buttons */}
); } /* ============================================================ MONEDERO ============================================================ */ function MonederoScreen({ onNav, onTraspaso, toast }) { const f = DATA.fallero, m = DATA.falla.moneda; const acciones = [ { l: 'Traspasar', i: I.transfer, fn: onTraspaso }, { l: 'Recargar', i: I.plus, fn: () => toast('Recarga iniciada') }, { l: 'Consumo', i: I.cart, fn: () => toast('Modo consumo en barra') }, { l: 'Historial', i: I.list, fn: () => toast('Historial completo') }, ]; return (
toast('Cambiar moneda')}>} />
{/* Hero saldo */}
{m.simbolo}
Saldo disponible
{f.saldo} {m.simbolo}
{acciones.map((a, k) => ( ))}
{/* Equivalencia + moneda selector */}
{m.simbolo}
1 {m.singular} = {m.equivalencia}
Moneda interna · {DATA.falla.nombre}
{m.nombre}
{/* Movimientos */}
Últimos movimientos
{DATA.movimientos.map(mv => { const inc = mv.tipo === 'in'; return (
{inc ? : }
{mv.concepto}
{mv.det} · {mv.fecha}
{mv.importe} {m.simbolo}
); })}
); } /* ============================================================ EVENTOS ============================================================ */ const ESTADO = { ok: { cls: 'gf-pill--ok', txt: 'Confirmado' }, wait: { cls: 'gf-pill--wait', txt: 'Pendiente' }, no: { cls: 'gf-pill--no', txt: 'Lista espera' }, }; function EventosScreen({ onNav, onEvento }) { return (
} />
Próximos · {DATA.eventos.length}
{DATA.eventos.map(ev => ( ))}
); } function EventoDetalle({ ev, onBack, onTraspaso, toast }) { const e = ev || DATA.eventos[0]; return (
{e.dia}
{e.mes}
{e.nombre}
{e.lugar}
{ESTADO[e.estado].txt} {e.plazas}
Productos asignados
{DATA.eventoDetalle.productos.map((p, i) => (
{p.nombre}
Cantidad: {p.cant}
{p.precio}
))}
); } /* ============================================================ PERFIL / AJUSTES ============================================================ */ function PerfilScreen({ onNav, onLogout, toast }) { const f = DATA.fallero; const groups = [ { items: [ { t: 'Tus datos', s: 'Ficha, unidad familiar, domicilio', i: I.id, fn: () => onNav('ficha') }, { t: 'Tarjeta fallera', s: 'Carnet digital y QR', i: I.qr, fn: () => onNav('carnet') }, ]}, { items: [ { t: 'Notificaciones', s: 'Avisos, eventos, cuotas', i: I.bellGear, fn: () => toast('Ajustes de notificaciones') }, { t: 'Seguridad', s: 'Contraseña y acceso', i: I.shield, fn: () => toast('Ajustes de seguridad') }, ]}, { items: [ { t: 'Cerrar sesión', s: null, i: I.logout, danger: true, fn: onLogout }, ]}, ]; return (
{f.nombre}
Último acceso: hoy, 09:41
{groups.map((g, gi) => (
{g.items.map((it, i) => ( ))}
))}
GestiFalla · v2.6.0 · {DATA.falla.nombre}
); } Object.assign(window, { TarjetaScreen, MonederoScreen, EventosScreen, EventoDetalle, PerfilScreen });