feat(panel): quita el botón "Nuevo becario"

El alta manual desde el panel creaba un becario sin teléfono/contraseña (estado
'activo' pero sin credenciales) que no podía iniciar sesión ni checar. El alta
real es el auto-registro del becario (celular+contraseña) → aprobación de la
supervisora. Se quita el botón del encabezado y del estado vacío, y se ajusta el
copy. La edición de becarios existentes (BecarioForm) se conserva.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jorem JuárezandClaude Fable 5 committed 2026-07-07 22:31:37 -06:00
1 parent 6ff459a7c4
commit 8049434a6b
1 file changed
+2 -4
+2 -4
View File
@@ -208,7 +208,6 @@ function VistaBecarios({ onOpen, onError }) {
try { await apiFetch(`/becarios/${b.id}/aprobar`, { method: "POST" }); await load(); } catch (e) { onError(e.message); }
};
const pendientes = (becarios || []).filter((b) => b.estado === "pendiente");
const nuevoBtn = (size) => <Btn size={size} onClick={() => setForm({})}>{iconBtn("plus", { size: 16, color: "#fff", sw: 2.2 })}Nuevo becario</Btn>;
// Buscador local sobre la lista ya cargada (nombre, celular, matrícula, institución).
const term = q.trim().toLowerCase();
const filtrados = term
@@ -218,12 +217,11 @@ function VistaBecarios({ onOpen, onError }) {
return (
<div>
<ColaAprobacion pendientes={pendientes} onAprobar={aprobar} />
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "16px" }}>
<div style={{ marginBottom: "16px" }}>
<h2 style={{ margin: 0, fontFamily: fonts.title, fontWeight: 600, fontSize: "22px", color: palette.brand, letterSpacing: "-.01em" }}>Becarios</h2>
{nuevoBtn()}
</div>
{becarios === null ? <p style={{ color: palette.inkSoft, fontFamily: fonts.body }}>Cargando…</p> :
becarios.length === 0 ? <EmptyState icon="users" tone="blue" title="Aún no hay becarios" sub="Crea el primero o espera a que se registren desde su celular." action={nuevoBtn()} /> :
becarios.length === 0 ? <EmptyState icon="users" tone="blue" title="Aún no hay becarios" sub="Los becarios aparecerán aquí cuando se registren desde su celular." /> :
<div>
<div style={{ position: "relative", maxWidth: "440px", marginBottom: "14px" }}>
<Input value={q} onChange={(e) => setQ(e.target.value)} placeholder="Buscar por nombre, celular, matrícula o institución…" style={{ paddingRight: "34px" }} />