diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx
index 0332ca7..d901dfc 100644
--- a/frontend/src/App.jsx
+++ b/frontend/src/App.jsx
@@ -337,7 +337,7 @@ function DashboardPage({ user, setUser }) {
}
// Cargar inspecciones
- const inspectionsRes = await fetch(`${API_URL}/api/inspections?limit=10`, {
+ const inspectionsRes = await fetch(`${API_URL}/api/inspections?limit=1000`, {
headers: {
'Authorization': `Bearer ${token}`,
},
@@ -4179,7 +4179,7 @@ function InspectionsTab({ inspections, user, onUpdate, onContinue }) {
// Filtro por rango de fechas
let matchesDate = true
if (dateFrom || dateTo) {
- const inspectionDate = new Date(inspection.created_at)
+ const inspectionDate = new Date(inspection.started_at)
if (dateFrom) {
const fromDate = new Date(dateFrom)
fromDate.setHours(0, 0, 0, 0)
@@ -4218,17 +4218,17 @@ function InspectionsTab({ inspections, user, onUpdate, onContinue }) {
return (
<>
{/* Buscador y Filtros */}
-
-
+
+
{/* Buscador */}
setSearchTerm(e.target.value)}
- className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
+ className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"
/>
@@ -4238,7 +4238,7 @@ function InspectionsTab({ inspections, user, onUpdate, onContinue }) {
-
- {/* Segunda fila de filtros */}
-
{/* Filtro por fecha hasta */}
@@ -4267,7 +4264,7 @@ function InspectionsTab({ inspections, user, onUpdate, onContinue }) {
type="date"
value={dateTo}
onChange={(e) => setDateTo(e.target.value)}
- className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
+ className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"
/>
@@ -4281,16 +4278,16 @@ function InspectionsTab({ inspections, user, onUpdate, onContinue }) {
setDateFrom('')
setDateTo('')
}}
- className="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition"
+ className="w-full px-3 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition text-sm"
>
- 🗑️ Limpiar filtros
+ 🗑️ Limpiar
)}
{/* Contador de resultados */}
-
+
Mostrando {filteredInspections.length > 0 ? startIndex + 1 : 0}-{Math.min(endIndex, filteredInspections.length)} de {filteredInspections.length} inspecciones
@@ -4356,10 +4353,10 @@ function InspectionsTab({ inspections, user, onUpdate, onContinue }) {
{/* Fechas de inspección */}
- {inspection.created_at && (
+ {inspection.started_at && (
📅
- Inicio: {new Date(inspection.created_at).toLocaleDateString('es-ES', {
+ Inicio: {new Date(inspection.started_at).toLocaleDateString('es-ES', {
day: '2-digit',
month: '2-digit',
year: 'numeric',