ui: campos sin caja en jornada pasada + pie "Powered by Collina Systems"
- becario: los campos de "Cargar jornada pasada" (fecha/entrada/salida/ actividad) pierden el recuadro relleno y quedan como texto con una línea sutil abajo, más elegante en móvil. - Se añade un pie "Powered by Collina Systems" en las cuatro páginas (checada, kiosco, panel, becario), en todas sus vistas. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
232f45f5d3
commit
76dab3dca1
4 files changed
+33
-7
No files matched your search
+16
-5
@@ -79,6 +79,13 @@ const ErrorBar = ({ error, onClose }) => !error ? null : (
|
||||
</div>
|
||||
);
|
||||
|
||||
// Pie de marca, compartido por las vistas de esta página.
|
||||
const PoweredBy = () => (
|
||||
<div style={{ textAlign: "center", padding: "20px 0 26px", fontFamily: fonts.body, fontSize: "11px", color: palette.inkSoft, letterSpacing: ".02em" }}>
|
||||
Powered by <span style={{ fontWeight: 600, color: palette.brand }}>Collina Systems</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
// ═══════════════ Acceso · login / registro ═══════════════
|
||||
function Acceso({ onEntra }) {
|
||||
const [modo, setModo] = useState(() =>
|
||||
@@ -148,6 +155,7 @@ function Acceso({ onEntra }) {
|
||||
</p>
|
||||
)}
|
||||
</Card>
|
||||
<PoweredBy />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -205,6 +213,9 @@ function Portal({ session, onSalir }) {
|
||||
const pendiente = resumen.estado === "pendiente";
|
||||
const meta = h.porcentaje >= 100;
|
||||
const secTitle = { margin: "20px 0 9px", fontFamily: fonts.title, fontWeight: 600, fontSize: "15px", color: palette.brand };
|
||||
// Campo "sin caja": solo el texto con una línea sutil abajo (más elegante que
|
||||
// el recuadro relleno). Se pasa como override de style al Input cream.
|
||||
const campoLimpio = { border: "none", borderBottom: `1.5px solid ${palette.line}`, borderRadius: 0, background: "transparent", padding: "10px 2px" };
|
||||
|
||||
return (
|
||||
<div style={{ minHeight: "100vh", background: palette.bgGradient, fontFamily: fonts.body }}>
|
||||
@@ -290,22 +301,22 @@ function Portal({ session, onSalir }) {
|
||||
<form onSubmit={crearJornadaCompleta}>
|
||||
<label style={{ display: "block", fontFamily: fonts.body, fontSize: "12px", fontWeight: 600, color: palette.label, marginBottom: "6px" }}>Fecha</label>
|
||||
<div style={{ marginBottom: "12px" }}>
|
||||
<Input type="date" value={dia.fecha} onChange={(e) => setDia({ ...dia, fecha: e.target.value })} required />
|
||||
<Input type="date" value={dia.fecha} onChange={(e) => setDia({ ...dia, fecha: e.target.value })} required style={campoLimpio} />
|
||||
</div>
|
||||
<div style={{ marginBottom: "12px" }}>
|
||||
<label style={{ display: "block", fontFamily: fonts.body, fontSize: "12px", fontWeight: 600, color: palette.label, marginBottom: "6px" }}>Entrada</label>
|
||||
<Input type="time" step="300" value={dia.entrada} onChange={(e) => setDia({ ...dia, entrada: e.target.value })} required />
|
||||
<Input type="time" step="300" value={dia.entrada} onChange={(e) => setDia({ ...dia, entrada: e.target.value })} required style={campoLimpio} />
|
||||
</div>
|
||||
<div style={{ marginBottom: "8px" }}>
|
||||
<label style={{ display: "block", fontFamily: fonts.body, fontSize: "12px", fontWeight: 600, color: palette.label, marginBottom: "6px" }}>Salida</label>
|
||||
<Input type="time" step="300" value={dia.salida} onChange={(e) => setDia({ ...dia, salida: e.target.value })} required />
|
||||
<Input type="time" step="300" value={dia.salida} onChange={(e) => setDia({ ...dia, salida: e.target.value })} required style={campoLimpio} />
|
||||
</div>
|
||||
<p style={{ margin: "0 0 14px", fontFamily: fonts.body, fontSize: "12px", color: palette.inkSoft, lineHeight: 1.4 }}>
|
||||
Las horas se registran en intervalos de 5 minutos (por ejemplo 9:00, 9:05, 9:10).
|
||||
</p>
|
||||
<label style={{ display: "block", fontFamily: fonts.body, fontSize: "12px", fontWeight: 600, color: palette.label, marginBottom: "6px" }}>¿Qué actividad realizaste? (obligatorio)</label>
|
||||
<div style={{ marginBottom: "12px" }}>
|
||||
<Input value={dia.concepto} onChange={(e) => setDia({ ...dia, concepto: e.target.value })} placeholder="Describe la actividad" required />
|
||||
<Input value={dia.concepto} onChange={(e) => setDia({ ...dia, concepto: e.target.value })} placeholder="Describe la actividad" required style={campoLimpio} />
|
||||
</div>
|
||||
{dia.entrada && dia.salida && dia.salida <= dia.entrada && (
|
||||
<Aviso variant="warn" icon="alertTriangle">La salida debe ser posterior a la entrada.</Aviso>
|
||||
@@ -332,7 +343,7 @@ function Portal({ session, onSalir }) {
|
||||
</Card>
|
||||
</>
|
||||
)}
|
||||
<div style={{ height: "30px" }} />
|
||||
<PoweredBy />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -48,6 +48,9 @@ const Shell = ({ children }) => (
|
||||
<Logo />
|
||||
</div>
|
||||
{children}
|
||||
<div style={{ textAlign: "center", padding: "18px 0 0", fontFamily: fonts.body, fontSize: "11px", color: palette.inkSoft, letterSpacing: ".02em" }}>
|
||||
Powered by <span style={{ fontWeight: 600, color: palette.brand }}>Collina Systems</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -38,6 +38,9 @@ const Shell = ({ children }) => (
|
||||
<div style={{ width: "100%", maxWidth: "420px" }}>
|
||||
<div style={{ display: "flex", justifyContent: "center", marginBottom: "22px" }}><Logo /></div>
|
||||
{children}
|
||||
<div style={{ textAlign: "center", padding: "18px 0 0", fontFamily: fonts.body, fontSize: "11px", color: palette.inkSoft, letterSpacing: ".02em" }}>
|
||||
Powered by <span style={{ fontWeight: 600, color: palette.brand }}>Collina Systems</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -163,7 +166,7 @@ function App() {
|
||||
useEffect(() => { apiFetch("/auth/session").then(setSession).catch(() => setSession(null)); }, []);
|
||||
const salir = async () => { try { await apiFetch("/auth/logout", { method: "POST" }); } catch {} setSession(null); };
|
||||
if (session === undefined) return <Shell><Cargando texto="Verificando sesión…" /></Shell>;
|
||||
if (!session) return <Login onEntra={setSession} />;
|
||||
if (!session) return <Shell><Login onEntra={setSession} /></Shell>;
|
||||
return <Kiosco onSalir={salir} />;
|
||||
}
|
||||
ReactDOM.createRoot(document.getElementById("root")).render(<App />);
|
||||
|
||||
+10
-1
@@ -66,6 +66,13 @@ const estadoDispTone = (e) => ({ pendiente: "warn", aprobado: "success", revocad
|
||||
|
||||
const iconBtn = (name, o) => <span style={{ display: "inline-flex" }}>{icons[name](o)}</span>;
|
||||
|
||||
// Pie de marca, compartido por login y panel.
|
||||
const PoweredBy = () => (
|
||||
<div style={{ textAlign: "center", padding: "22px 0 8px", fontFamily: fonts.body, fontSize: "11px", color: palette.inkSoft, letterSpacing: ".02em" }}>
|
||||
Powered by <span style={{ fontWeight: 600, color: palette.brand }}>Collina Systems</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
// ── Modal de confirmación (sustituye el diálogo nativo del navegador) ──
|
||||
// La llamada al backend vive en `onConfirm` (el padre); aquí solo la UI.
|
||||
function ConfirmModal({ title, message, confirmLabel, variant, onConfirm, onCancel }) {
|
||||
@@ -101,7 +108,7 @@ function Login({ onLogin }) {
|
||||
} finally { setBusy(false); }
|
||||
};
|
||||
return (
|
||||
<div style={{ minHeight: "100vh", background: palette.bgGradient, display: "flex", alignItems: "center", justifyContent: "center", fontFamily: fonts.body, padding: "24px" }}>
|
||||
<div style={{ minHeight: "100vh", background: palette.bgGradient, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", fontFamily: fonts.body, padding: "24px" }}>
|
||||
<Card style={{ width: "100%", maxWidth: "400px", borderRadius: "24px", padding: "36px 34px" }}>
|
||||
<div style={{ display: "flex", justifyContent: "center", marginBottom: "18px" }}><Logo style={{ height: "60px" }} /></div>
|
||||
<h1 style={{ margin: "0 0 24px", fontFamily: fonts.title, fontWeight: 600, fontSize: "24px", color: palette.brand, textAlign: "center", letterSpacing: "-.01em" }}>Panel de supervisión</h1>
|
||||
@@ -114,6 +121,7 @@ function Login({ onLogin }) {
|
||||
</div>
|
||||
</form>
|
||||
</Card>
|
||||
<PoweredBy />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -630,6 +638,7 @@ function Panel({ session, onLogout }) {
|
||||
{view.name === "detalle" && <VistaBecario becarioId={view.id} onBack={() => setView({ name: "lista" })} onError={setError} />}
|
||||
{view.name === "solicitudes" && <VistaSolicitudes onError={setError} />}
|
||||
{view.name === "config" && <VistaConfig onError={setError} />}
|
||||
<PoweredBy />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user