From 354270be98d0e5256084b33b221b8805c141e436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Consultor=C3=ADa=20AS?= Date: Wed, 28 Jan 2026 02:03:28 +0000 Subject: [PATCH] feat(phase-5): Complete dashboard UI templates - Add posts.html: Post management with filtering by status/platform/type, stats display, pagination, edit modal, and actions (approve, reject, publish now, schedule, edit, delete) - Add calendar.html: Visual calendar with month/week views, drag-and-drop rescheduling, platform filtering with color-coded status - Add interactions.html: Interactions management with filtering, detail panel for responding, AI response suggestions, lead marking - Add settings.html: API connection status, DeepSeek config, Telegram notifications setup, system info, and quick actions - Update dashboard.py with settings route Co-Authored-By: Claude Opus 4.5 --- app/api/routes/dashboard.py | 13 + dashboard/templates/calendar.html | 436 +++++++++++++++++++++++++ dashboard/templates/interactions.html | 424 ++++++++++++++++++++++++ dashboard/templates/posts.html | 449 ++++++++++++++++++++++++++ dashboard/templates/settings.html | 422 ++++++++++++++++++++++++ 5 files changed, 1744 insertions(+) create mode 100644 dashboard/templates/calendar.html create mode 100644 dashboard/templates/interactions.html create mode 100644 dashboard/templates/posts.html create mode 100644 dashboard/templates/settings.html diff --git a/app/api/routes/dashboard.py b/app/api/routes/dashboard.py index 0e5d8ad..2df9b8b 100644 --- a/app/api/routes/dashboard.py +++ b/app/api/routes/dashboard.py @@ -167,3 +167,16 @@ async def dashboard_services(request: Request, db: Session = Depends(get_db)): "request": request, "user": user.to_dict() }) + + +@router.get("/settings", response_class=HTMLResponse) +async def dashboard_settings(request: Request, db: Session = Depends(get_db)): + """Página de configuración.""" + user = require_auth(request, db) + if not user: + return RedirectResponse(url="/login", status_code=302) + + return templates.TemplateResponse("settings.html", { + "request": request, + "user": user.to_dict() + }) diff --git a/dashboard/templates/calendar.html b/dashboard/templates/calendar.html new file mode 100644 index 0000000..c75fd27 --- /dev/null +++ b/dashboard/templates/calendar.html @@ -0,0 +1,436 @@ + + + + + + Calendario - Social Media Automation + + + + + +
+
+

+ Consultoría AS - Social Media +

+ +
+
+ +
+ +
+
+ +

Enero 2025

+ +
+
+ + + +
+
+ + +
+
+ Filtrar: + + + + +
+
+ Programado + Pendiente + Publicado +
+
+
+ + +
+ +
+
Lun
+
Mar
+
Mié
+
Jue
+
Vie
+
Sáb
+
Dom
+
+ + +
+ +
+
+ + + +
+ + + + + + + diff --git a/dashboard/templates/interactions.html b/dashboard/templates/interactions.html new file mode 100644 index 0000000..52fef84 --- /dev/null +++ b/dashboard/templates/interactions.html @@ -0,0 +1,424 @@ + + + + + + Interacciones - Social Media Automation + + + + + +
+
+

+ Consultoría AS - Social Media +

+ +
+
+ +
+
+ +
+ +
+
+ + + +
+ +
+
+ + +
+
+
0
+
Sin responder
+
+
+
0
+
Respondidos
+
+
+
0
+
Leads
+
+
+
0
+
Total
+
+
+ + +
+
+

Interacciones

+
+
+
Cargando...
+
+
+
+ + +
+
+
+

Selecciona una interacción

+

para ver detalles y responder

+
+
+
+
+
+ + + + + + diff --git a/dashboard/templates/posts.html b/dashboard/templates/posts.html new file mode 100644 index 0000000..e977f60 --- /dev/null +++ b/dashboard/templates/posts.html @@ -0,0 +1,449 @@ + + + + + + Posts - Social Media Automation + + + + + +
+
+

+ Consultoría AS - Social Media +

+ +
+
+ +
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+
0
+
Publicados
+
+
+
0
+
Programados
+
+
+
0
+
Pendientes
+
+
+
0
+
Borradores
+
+
+
0
+
Fallidos
+
+
+ + +
+
+

Posts

+ 0 posts +
+
+ +
+ Cargando posts... +
+
+
+ + + +
+ + + + + + + diff --git a/dashboard/templates/settings.html b/dashboard/templates/settings.html new file mode 100644 index 0000000..74cfe00 --- /dev/null +++ b/dashboard/templates/settings.html @@ -0,0 +1,422 @@ + + + + + + Configuración - Social Media Automation + + + + + +
+
+

+ Consultoría AS - Social Media +

+ +
+
+ +
+

Configuración del Sistema

+ + +
+

Conexiones de APIs

+
+
Verificando conexiones...
+
+ +
+ + +
+

Configuración de IA (DeepSeek)

+
+
Verificando...
+
+
+

Para configurar DeepSeek API:

+
    +
  1. Visita platform.deepseek.com
  2. +
  3. Crea una cuenta y genera una API Key
  4. +
  5. Agrega al archivo .env: DEEPSEEK_API_KEY=tu_key
  6. +
  7. Reinicia la aplicación
  8. +
+
+
+ + +
+

Notificaciones Telegram

+
+
Verificando...
+
+
+ + +
+ +
+ + +
+

Información del Sistema

+
+
+ Versión: + 1.0.0 +
+
+ Entorno: + - +
+
+ Base de datos: + - +
+
+ Redis: + - +
+
+
+ + +
+

Acciones Rápidas

+
+ + + + +
+
+ + +
+

Estadísticas de Uso

+
+
+
-
+
Posts Totales
+
+
+
-
+
Este Mes
+
+
+
-
+
Interacciones
+
+
+
-
+
Leads
+
+
+
+
+ + + + + + +