feat: add full frontend — client portal and admin panel

Páginas cliente: login magic link, registro, validación de token,
dashboard de autos, historial por auto y reserva de turnos con selector
de servicio + slots disponibles.

Páginas admin: login, dashboard de turnos del día con cambio de estado,
historial de autos (buscar cliente → auto → ver/cargar registros),
gestión de tipos de servicio y vista de clientes.

Middleware JWT para proteger rutas /cliente/* y /admin/*.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Beldor
2026-06-18 12:01:31 -03:00
parent 93ad1cb8c1
commit 4cf35f9280
24 changed files with 1687 additions and 15 deletions
+9 -8
View File
@@ -8,15 +8,16 @@ export async function GET(req: NextRequest) {
const { searchParams } = new URL(req.url);
const fecha = searchParams.get("fecha"); // YYYY-MM-DD
const clienteId = searchParams.get("clienteId");
const where = fecha
? {
fechaInicio: {
gte: new Date(`${fecha}T00:00:00`),
lte: new Date(`${fecha}T23:59:59`),
},
}
: {};
const where: Record<string, unknown> = {};
if (fecha) {
where.fechaInicio = {
gte: new Date(`${fecha}T00:00:00`),
lte: new Date(`${fecha}T23:59:59`),
};
}
if (clienteId) where.clienteId = clienteId;
const turnos = await prisma.turno.findMany({
where,