feat: add settings and reports pages

- Add settings page with organization, sites, courts, and users tabs
- Add reports page with revenue charts and statistics
- Add users API endpoint
- Add sites/[id] API endpoint for CRUD operations
- Add tabs UI component
- Fix sites API to return isActive field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ivan
2026-02-01 08:27:32 +00:00
parent 864902df81
commit 51ecb1b231
15 changed files with 2083 additions and 17 deletions

View File

@@ -5,7 +5,7 @@
# Stage 1: Dependencias
# ============================================
FROM node:20-alpine AS deps
RUN apk add --no-cache libc6-compat
RUN apk add --no-cache libc6-compat openssl
WORKDIR /app
@@ -24,7 +24,7 @@ RUN pnpm install --frozen-lockfile
# Stage 2: Builder
# ============================================
FROM node:20-alpine AS builder
RUN apk add --no-cache libc6-compat
RUN apk add --no-cache libc6-compat openssl
WORKDIR /app
@@ -50,6 +50,7 @@ RUN pnpm build
# Stage 3: Runner (Produccion)
# ============================================
FROM node:20-alpine AS runner
RUN apk add --no-cache openssl
WORKDIR /app
@@ -61,17 +62,15 @@ ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
# Copiar archivos necesarios para produccion
COPY --from=builder /app/apps/web/public ./apps/web/public
# Copiar archivos de Next.js standalone
# Copiar archivos de Next.js standalone (incluye node_modules necesarios)
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
# Crear public folder
RUN mkdir -p ./apps/web/public && chown nextjs:nodejs ./apps/web/public
# Copiar schema de Prisma para migraciones
COPY --from=builder /app/apps/web/prisma ./apps/web/prisma
COPY --from=builder /app/apps/web/node_modules/.prisma ./apps/web/node_modules/.prisma
COPY --from=builder /app/apps/web/node_modules/@prisma ./apps/web/node_modules/@prisma
# Cambiar a usuario no-root
USER nextjs
@@ -83,4 +82,4 @@ ENV PORT 3000
ENV HOSTNAME "0.0.0.0"
# Comando de inicio
CMD ["node", "apps/web/server.js"]
CMD ["node", "server.js"]