diff --git a/frontend/package.json b/frontend/package.json index fea65ec..b3631f7 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "checklist-frontend", "private": true, - "version": "1.0.85", + "version": "1.0.86", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 960484f..b87d18c 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -178,7 +178,8 @@ function DashboardPage({ user, setUser }) { const [loading, setLoading] = useState(true) const [activeTab, setActiveTab] = useState('checklists') const [activeInspection, setActiveInspection] = useState(null) - const [sidebarOpen, setSidebarOpen] = useState(true) + // Sidebar cerrado por defecto en móvil + const [sidebarOpen, setSidebarOpen] = useState(window.innerWidth >= 1024) const [logoUrl, setLogoUrl] = useState(null); useEffect(() => { const fetchLogo = async () => { @@ -293,34 +294,43 @@ function DashboardPage({ user, setUser }) { /> {/* Main Content */} -
+
{/* Header */}
-
-
+
+
+ {/* Botón hamburguesa (solo móvil) */} + + {/* Logo y Nombre del Sistema */} -
+
{logoUrl ? ( - Logo + Logo ) : ( -
Sin logo
+
Sin logo
)} -
-

AYUTEC

+
+

AYUTEC

Sistema Inteligente de Inspecciones

{/* Sección Activa */} -
- +
+ {activeTab === 'checklists' && '📋'} {activeTab === 'inspections' && '🔍'} {activeTab === 'users' && '👥'} {activeTab === 'reports' && '📊'} {activeTab === 'settings' && '⚙️'} - + {activeTab === 'checklists' && 'Checklists'} {activeTab === 'inspections' && 'Inspecciones'} {activeTab === 'users' && 'Usuarios'} @@ -328,14 +338,24 @@ function DashboardPage({ user, setUser }) { {activeTab === 'settings' && 'Configuración'}
+ {/* Indicador móvil (solo icono) */} +
+ + {activeTab === 'checklists' && '📋'} + {activeTab === 'inspections' && '🔍'} + {activeTab === 'users' && '👥'} + {activeTab === 'reports' && '📊'} + {activeTab === 'settings' && '⚙️'} + +
{/* Content */} -
-
-
+
+
+
{loading ? (
Cargando datos...
@@ -4534,12 +4554,12 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl const visibleBlock = visibleQuestions.slice(startIdx, endIdx); const QuestionNavigator = () => ( -
+
{/* Flecha izquierda */} @@ -4599,22 +4619,22 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl {/* AI Mode Banner */} {checklist.ai_mode !== 'off' && ( -
-
- 🤖 -
-

+ 🤖 +

+

{checklist.ai_mode === 'full' ? 'Modo AUTOCOMPLETADO activado' : 'Modo ASISTIDO activado'}

+ } mt-1`}> {checklist.ai_mode === 'full' ? 'El sistema completará automáticamente las respuestas al cargar documentos. Revisa y ajusta si es necesario.' : 'El sistema sugerirá observaciones al cargar documentos.'} @@ -4786,25 +4806,25 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl )} {step === 2 && currentQuestion && ( -

+
{/* Barra de navegación de preguntas */} -
-
+
+
Sección: {currentQuestion.section}
-

+

{currentQuestion.text}

{currentQuestion.points > 0 && ( -
+
Puntos: {currentQuestion.points}
)} {console.log('Current question:', currentQuestion.id, 'Type:', currentQuestion.type, 'Answer:', answers[currentQuestion.id])}
-
+
{/* Answer input based on type - NO mostrar para photo_only */} {currentQuestion.options?.type !== 'photo_only' && (
@@ -4944,7 +4964,7 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl )}
-
+
{currentQuestionIndex < getVisibleQuestions().length - 1 ? ( @@ -4977,9 +4998,10 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl saveAnswer(currentQuestion.id) goToQuestion(currentQuestionIndex + 1) }} - className="flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition" + className="flex-1 px-3 sm:px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition text-sm sm:text-base" > - Siguiente → + Siguiente → + ) : ( )}
diff --git a/frontend/src/Sidebar.jsx b/frontend/src/Sidebar.jsx index 9bb85a0..71ba19a 100644 --- a/frontend/src/Sidebar.jsx +++ b/frontend/src/Sidebar.jsx @@ -1,6 +1,20 @@ export default function Sidebar({ user, activeTab, setActiveTab, sidebarOpen, setSidebarOpen, onLogout }) { return ( -