feat: introduce global AI task dashboard, enhance user profiles with new fields, and update database models with default implementations.

This commit is contained in:
2026-03-06 12:37:39 -03:00
parent c034f7223d
commit 997af5d473
5 changed files with 82 additions and 2 deletions
+1
View File
@@ -29,6 +29,7 @@ El proyecto ha sido optimizado para reducir la complejidad de la infraestructura
- **Gamified Activities**: Nuevos tipos de bloques interactivos para niños y jóvenes, incluyendo Juegos de Memoria y Puntos Calientes (Hotspots).
- **AI Image Generation**: Generación automática de contenido visual a partir de guiones de lecciones o prompts personalizados, con soporte para resoluciones personalizadas (HD/4K) y gestión de portadas de curso de alta calidad.
- **Course Marketing & Summary**: Sistema de metadatos estructurados (objetivos, requisitos) y landing pages premium para una mejor presentación de cursos.
- **Global AI Task Dashboard**: Panel unificado de control en consola administrativa para monitorear, reintentar y cancelar tareas de IA en segundo plano (transcripciones, imágenes, etc).
- **Dynamic API Resolution**: Resolución inteligente de endpoints que permite el acceso desde cualquier dispositivo en la red local (WiFi) sin configuración manual.
- **Responsive UI/UX**: Interfaces optimizadas para dispositivos móviles con menús adaptativos y escalado fluido de componentes.
- **AI Teaching Assistant (RAG)**: Tutor inteligente dentro de cada lección que ayuda a los estudiantes utilizando el contexto de la lección actual y el historial del curso.
+1
View File
@@ -223,6 +223,7 @@
- [x] **Metadatos de Marketing Estructurados**: Captura de objetivos, requisitos, público objetivo y certificación en Studio. (Completado)
- [x] **Premium Course Summary**: Nueva interfaz de "Acerca del Curso" en Experience con diseño de alta fidelidad y navegación por pestañas. (Completado)
- [x] **Gestión de Portadas de Curso**: Integración de imágenes generadas por IA como activos principales del curso con previsualización dinámica. (Completado)
- [x] **Dashboard Global de Tareas AI**: Panel centralizado para monitorizar, reintentar y cancelar todas las generaciones en segundo plano (imágenes, videos, transcripciones). (Completado)
---
+1 -1
View File
@@ -1,4 +1,4 @@
+use crate::handlers::run_transcription_task;
use crate::handlers::run_transcription_task;
use axum::{
Json,
extract::{Path, State},
+3
View File
@@ -196,6 +196,9 @@ pub async fn lti_launch(
avatar_url: None,
bio: None,
language: None,
is_public_profile: Some(true),
linkedin_url: None,
github_url: None,
created_at: chrono::Utc::now(),
updated_at: chrono::Utc::now(),
});
+76 -1
View File
@@ -3,7 +3,8 @@ use serde::{Deserialize, Serialize};
use serde_json;
use uuid::Uuid;
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow, Clone)]
#[derive(Debug, Serialize, Deserialize, Clone, sqlx::FromRow)]
#[sqlx(default)]
pub struct Course {
pub id: Uuid,
pub organization_id: Uuid,
@@ -26,6 +27,32 @@ pub struct Course {
pub updated_at: DateTime<Utc>,
}
impl Default for Course {
fn default() -> Self {
Self {
id: Uuid::new_v4(),
organization_id: Uuid::new_v4(),
title: String::new(),
description: None,
instructor_id: Uuid::new_v4(),
pacing_mode: "self_paced".to_string(),
start_date: None,
end_date: None,
passing_percentage: 0,
certificate_template: None,
price: 0.0,
currency: "USD".to_string(),
marketing_metadata: None,
course_image_url: None,
generation_status: None,
generation_progress: None,
generation_error: None,
created_at: Utc::now(),
updated_at: Utc::now(),
}
}
}
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow, Clone)]
pub struct Module {
pub id: Uuid,
@@ -83,6 +110,7 @@ pub struct UserGrade {
pub attempts_count: i32,
pub metadata: Option<serde_json::Value>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow, Clone)]
@@ -313,6 +341,7 @@ pub struct Transaction {
}
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow)]
#[sqlx(default)]
pub struct User {
pub id: Uuid,
pub organization_id: Uuid,
@@ -325,10 +354,36 @@ pub struct User {
pub avatar_url: Option<String>,
pub bio: Option<String>,
pub language: Option<String>,
pub is_public_profile: Option<bool>,
pub linkedin_url: Option<String>,
pub github_url: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
impl Default for User {
fn default() -> Self {
Self {
id: Uuid::new_v4(),
organization_id: Uuid::new_v4(),
email: String::new(),
password_hash: String::new(),
full_name: String::new(),
role: "student".to_string(),
xp: 0,
level: 1,
avatar_url: None,
bio: None,
language: None,
is_public_profile: Some(true),
linkedin_url: None,
github_url: None,
created_at: Utc::now(),
updated_at: Utc::now(),
}
}
}
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow)]
pub struct UserResponse {
pub id: Uuid,
@@ -344,6 +399,7 @@ pub struct UserResponse {
}
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow, Clone)]
#[sqlx(default)]
pub struct Organization {
pub id: Uuid,
pub name: String,
@@ -359,6 +415,25 @@ pub struct Organization {
pub updated_at: DateTime<Utc>,
}
impl Default for Organization {
fn default() -> Self {
Self {
id: Uuid::new_v4(),
name: String::new(),
domain: None,
logo_url: None,
primary_color: None,
secondary_color: None,
certificate_template: None,
platform_name: None,
favicon_url: None,
logo_variant: None,
created_at: Utc::now(),
updated_at: Utc::now(),
}
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct AuthResponse {
pub user: UserResponse,