From 45ad650bac40e14fc703429acd992baafd3022a4 Mon Sep 17 00:00:00 2001 From: ronalds Date: Sun, 30 Nov 2025 22:59:38 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Mejoras=20de=20Responsividad=20M?= =?UTF-8?q?=C3=B3vil=20(v1.0.86)=20Sidebar=20=E2=9C=85=20Oculto=20por=20de?= =?UTF-8?q?fecto=20en=20m=C3=B3vil=20(window.innerWidth=20<=201024px)=20?= =?UTF-8?q?=E2=9C=85=20Overlay=20oscuro=20cuando=20est=C3=A1=20abierto=20e?= =?UTF-8?q?n=20m=C3=B3vil=20(se=20cierra=20al=20tocar=20fuera)=20=E2=9C=85?= =?UTF-8?q?=20Deslizable=20desde=20la=20izquierda=20con=20transiciones=20s?= =?UTF-8?q?uaves=20=E2=9C=85=20Siempre=20visible=20en=20desktop=20(lg:=20b?= =?UTF-8?q?reakpoint)=20Header=20=E2=9C=85=20Bot=C3=B3n=20hamburguesa=20vi?= =?UTF-8?q?sible=20solo=20en=20m=C3=B3vil=20(lg:hidden)=20=E2=9C=85=20Logo?= =?UTF-8?q?=20escalable:=2050px=20en=20m=C3=B3vil=20=E2=86=92=2070px=20en?= =?UTF-8?q?=20desktop=20=E2=9C=85=20T=C3=ADtulo=20oculto=20en=20m=C3=B3vil?= =?UTF-8?q?=20para=20ahorrar=20espacio=20=E2=9C=85=20Indicador=20de=20secc?= =?UTF-8?q?i=C3=B3n:=20icono=20solo=20en=20m=C3=B3vil,=20texto=20completo?= =?UTF-8?q?=20en=20desktop=20=E2=9C=85=20Padding=20adaptable:=203px=20m?= =?UTF-8?q?=C3=B3vil=20=E2=86=92=204px=20tablet=20=E2=86=92=208px=20deskto?= =?UTF-8?q?p=20Contenido=20Principal=20=E2=9C=85=20Sin=20margin-left=20en?= =?UTF-8?q?=20m=C3=B3vil=20(el=20sidebar=20es=20overlay)=20=E2=9C=85=20Pad?= =?UTF-8?q?ding=20responsive:=203px=20=E2=86=92=204px=20=E2=86=92=206px=20?= =?UTF-8?q?seg=C3=BAn=20tama=C3=B1o=20=E2=9C=85=20Border-radius=20adaptabl?= =?UTF-8?q?e:=20xl=20en=20m=C3=B3vil=20=E2=86=92=202xl=20en=20desktop=20Mo?= =?UTF-8?q?dal=20de=20Inspecci=C3=B3n=20=E2=9C=85=20Ancho=20completo=20en?= =?UTF-8?q?=20m=C3=B3vil=20con=20padding=20m=C3=ADnimo=20(2px)=20=E2=9C=85?= =?UTF-8?q?=20T=C3=ADtulo=20responsive:=20lg=20(m=C3=B3vil)=20=E2=86=92=20?= =?UTF-8?q?xl=20(tablet)=20=E2=86=92=202xl=20(desktop)=20=E2=9C=85=20Altur?= =?UTF-8?q?a=20m=C3=A1xima:=2095vh=20m=C3=B3vil=20=E2=86=92=2090vh=20deskt?= =?UTF-8?q?op=20Navegador=20de=20Preguntas=20=E2=9C=85=20Botones=20m=C3=A1?= =?UTF-8?q?s=20peque=C3=B1os=20en=20m=C3=B3vil:=207px/8px=20c=C3=ADrculos?= =?UTF-8?q?=20=E2=9C=85=20Overflow=20horizontal=20con=20scroll=20para=20mu?= =?UTF-8?q?chas=20preguntas=20=E2=9C=85=20N=C3=BAmeros=20responsive:=20tex?= =?UTF-8?q?to=20sm=20en=20m=C3=B3vil=20=E2=86=92=20lg=20en=20desktop=20?= =?UTF-8?q?=E2=9C=85=20Gaps=20reducidos:=201px=20m=C3=B3vil=20=E2=86=92=20?= =?UTF-8?q?2px=20desktop=20Botones=20de=20Navegaci=C3=B3n=20=E2=9C=85=20So?= =?UTF-8?q?lo=20flechas=20en=20m=C3=B3vil=20(=E2=86=90=20=E2=86=92)=20?= =?UTF-8?q?=E2=9C=85=20Texto=20completo=20en=20desktop=20("=E2=86=90=20Ant?= =?UTF-8?q?erior",=20"Siguiente=20=E2=86=92")=20=E2=9C=85=20Padding=20y=20?= =?UTF-8?q?texto=20adaptables:=20text-sm=20m=C3=B3vil=20=E2=86=92=20text-b?= =?UTF-8?q?ase=20desktop=20=E2=9C=85=20Mejor=20uso=20del=20espacio=20horiz?= =?UTF-8?q?ontal=20Formularios=20=E2=9C=85=20Espaciado=20adaptive:=20space?= =?UTF-8?q?-y-3=20m=C3=B3vil=20=E2=86=92=20space-y-6=20desktop=20=E2=9C=85?= =?UTF-8?q?=20Labels=20y=20texto=20responsive:=20xs=20=E2=86=92=20sm=20?= =?UTF-8?q?=E2=86=92=20base=20=E2=9C=85=20Banner=20de=20modo=20IA=20con=20?= =?UTF-8?q?wrap=20en=20m=C3=B3vil=20La=20interfaz=20ahora=20es=20completam?= =?UTF-8?q?ente=20funcional=20en=20m=C3=B3viles=20sin=20scroll=20horizonta?= =?UTF-8?q?l,=20con=20todos=20los=20elementos=20accesibles=20y=20legibles!?= =?UTF-8?q?=20=F0=9F=93=B1=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- frontend/src/App.jsx | 111 +++++++++++++++++++++++---------------- frontend/src/Sidebar.jsx | 19 ++++++- 3 files changed, 85 insertions(+), 47 deletions(-) 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 ( -