-
Creado
-
+
Creado
+
{new Date(project.createdAt).toLocaleDateString('es-ES', {
day: 'numeric',
month: 'short',
@@ -286,8 +253,8 @@ export default function ProjectDetail({ project }: ProjectDetailProps) {
-
Última Actualización
-
+
Última Actualización
+
{new Date(project.updatedAt).toLocaleDateString('es-ES', {
day: 'numeric',
month: 'short',
diff --git a/components/dashboard/project-grid.tsx b/components/dashboard/project-grid.tsx
index 41a781f..dd7b2b8 100644
--- a/components/dashboard/project-grid.tsx
+++ b/components/dashboard/project-grid.tsx
@@ -13,7 +13,7 @@ export default function ProjectGrid({ projects, viewMode }: ProjectGridProps) {
if (projects.length === 0) {
return (
-
No se encontraron proyectos
+
No se encontraron proyectos
);
}
diff --git a/components/dashboard/project-list-item.tsx b/components/dashboard/project-list-item.tsx
index f419f2e..7622c23 100644
--- a/components/dashboard/project-list-item.tsx
+++ b/components/dashboard/project-list-item.tsx
@@ -2,9 +2,9 @@
import Link from 'next/link';
import { Calendar, DollarSign, TrendingUp } from 'lucide-react';
-import { Badge } from '@/components/ui/badge';
import { Avatar, AvatarFallback } from '@/components/ui/avatar';
-import { Project, ProjectStatus } from '@/types/project';
+import { ProjectStatusBadge } from '@/components/ui/project-status-badge';
+import { Project } from '@/types/project';
interface ProjectListItemProps {
project: Project;
@@ -20,40 +20,6 @@ function getInitials(name: string): string {
.slice(0, 2);
}
-// Componente para el badge de estado con estilos directos
-function StatusBadge({ status }: { status: ProjectStatus }) {
- if (status === '0') {
- return (
-
- Borrador
-
- );
- }
-
- if (status === '1') {
- return (
-
- Abierto
-
- );
- }
-
- if (status === '2') {
- return (
-
- Cerrado
-
- );
- }
-
- // Fallback
- return (
-
- Desconocido
-
- );
-}
-
/**
* Componente de fila de proyecto para vista de lista
* Diseño horizontal y compacto
@@ -63,7 +29,7 @@ export default function ProjectListItem({ project }: ProjectListItemProps) {
return (
-
+
{/* Avatar */}
@@ -77,30 +43,30 @@ export default function ProjectListItem({ project }: ProjectListItemProps) {
-
+
{project.name}
- {project.ref}
+ {project.ref}
{project.client !== 'Sin cliente' && (
-
{project.client}
+
{project.client}
)}
{/* Estado */}
-
+
{/* Progreso */}
-
+
- Progreso
- {project.progress}%
+ Progreso
+ {project.progress}%
-
+
-
+
€{project.budget.toLocaleString('es-ES', { minimumFractionDigits: 0, maximumFractionDigits: 0 })}
-
Presupuesto
+
Presupuesto
{/* Fechas */}
-
+
-
+
{new Date(project.startDate).toLocaleDateString('es-ES', { day: '2-digit', month: 'short' })}
-
Inicio
+
Inicio
diff --git a/components/dashboard/stats-overview.tsx b/components/dashboard/stats-overview.tsx
index cd6bfdb..27e909d 100644
--- a/components/dashboard/stats-overview.tsx
+++ b/components/dashboard/stats-overview.tsx
@@ -20,49 +20,49 @@ export default function StatsOverview({ projects }: StatsOverviewProps) {
return (
-
+
- Total Proyectos
-
+ Total Proyectos
+
- {stats.total}
- Todos los proyectos
+ {stats.total}
+ Todos los proyectos
-
+
- Activos
+ Activos
- {stats.activos}
- En progreso ahora
+ {stats.activos}
+ En progreso ahora
-
+
- Presupuesto Total
+ Presupuesto Total
-
+
€{(stats.totalBudget / 1000).toFixed(0)}k
-
Suma de presupuestos
+
Suma de presupuestos
-
+
- Progreso Medio
+ Progreso Medio
- {stats.avgProgress}%
- De todos los proyectos
+ {stats.avgProgress}%
+ De todos los proyectos
diff --git a/components/gantt/gantt-page.tsx b/components/gantt/gantt-page.tsx
index aeb9d3c..ce3b323 100644
--- a/components/gantt/gantt-page.tsx
+++ b/components/gantt/gantt-page.tsx
@@ -265,10 +265,10 @@ export default function GanttPage() {
if (error) {
return (
-
+
-
-
{error}
+
+
{error}