Fix: texto blanco sobre verde institucional en elementos rellenos

El verde UABC (#00723F) es demasiado oscuro para texto carbón (~2:1,
falla AA). Corrige BrandMark, nav activo (sidebar/dock), chip de
FiltroCategorias y botón de Google en login a texto/ícono blanco
(~6.2:1). Actualiza DESIGN.md/PRODUCT.md y design.json acorde.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-17 08:35:28 -07:00
parent 0247b979ca
commit 4005008872
12 changed files with 69 additions and 67 deletions
@@ -0,0 +1,35 @@
import type { APIRoute } from 'astro';
const json = (body: unknown, status = 200) =>
new Response(JSON.stringify(body), { status, headers: { 'content-type': 'application/json' } });
export const GET: APIRoute = async ({ params, locals }) => {
if (!locals.user) return json({ error: 'no autenticado' }, 401);
if (locals.profile?.rol !== 'admin') return json({ error: 'no autorizado' }, 403);
const id = Number(params.id);
if (!Number.isInteger(id) || id <= 0) return json({ error: 'id inválido' }, 400);
const prestamoQ = locals.supabase
.from('prestamos')
.select(
'id, cantidad, estado, fecha_solicitud, fecha_aprobacion, fecha_devolucion_estimada, fecha_devolucion_real, notas, alumno:profiles!alumno_id(id, nombre, email, matricula), material:materiales!material_id(id, nombre, numero_inventario)'
)
.eq('id', id)
.maybeSingle();
// Nombre y orden asumidos del audit_log: select('*') para no romper si el esquema difiere.
const logQ = locals.supabase
.from('audit_log')
.select('*')
.eq('prestamo_id', id)
.order('created_at', { ascending: false })
.limit(20);
const [{ data: prestamo, error: pErr }, { data: audit_log, error: lErr }] = await Promise.all([prestamoQ, logQ]);
if (pErr) return json({ error: pErr.message }, 500);
if (!prestamo) return json({ error: 'no encontrado' }, 404);
return json({ prestamo, audit_log: lErr ? [] : (audit_log ?? []) });
};