diff --git a/frontend/package.json b/frontend/package.json index 788682b..f684c10 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "checklist-frontend", "private": true, - "version": "1.0.89", + "version": "1.0.90", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/public/service-worker.js b/frontend/public/service-worker.js index 8886a97..778ea53 100644 --- a/frontend/public/service-worker.js +++ b/frontend/public/service-worker.js @@ -1,6 +1,6 @@ // Service Worker para PWA con detecci贸n de actualizaciones // IMPORTANTE: Actualizar esta versi贸n cada vez que se despliegue una nueva versi贸n -const CACHE_NAME = 'ayutec-v1.0.89'; +const CACHE_NAME = 'ayutec-v1.0.90'; const urlsToCache = [ '/', '/index.html' diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 3ccc4b9..2aa95c1 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -4921,8 +4921,8 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl
- {/* Answer input based on type - NO mostrar para photo_only */} - {currentQuestion.options?.type !== 'photo_only' && ( + {/* Answer input based on type - NO mostrar para photo_only ni ai_assistant */} + {currentQuestion.options?.type !== 'photo_only' && currentQuestion.options?.type !== 'ai_assistant' && (
)} - {/* Observations - NO mostrar para photo_only */} - {currentQuestion.options?.type !== 'photo_only' && ( + {/* Bot贸n de Chat IA - Mostrar SIEMPRE si es tipo ai_assistant */} + {currentQuestion.options?.type === 'ai_assistant' && ( +
+ { + setAnswers(prev => ({ + ...prev, + [currentQuestion.id]: { ...prev[currentQuestion.id], value: newValue } + })) + }} + onSave={() => setTimeout(() => saveAnswer(currentQuestion.id), 500)} + /> + + +
+ )} + + {/* Observations - Mostrar solo si show_observations !== false */} + {currentQuestion.options?.type !== 'photo_only' && + currentQuestion.options?.type !== 'ai_assistant' && + currentQuestion.options?.show_observations !== false && (
- {/* Analyze Button */} - {(checklist.ai_mode === 'assisted' || checklist.ai_mode === 'full') && ( + {/* Analyze Button - Solo para ai_mode assisted/full y NO para ai_assistant */} + {(checklist.ai_mode === 'assisted' || checklist.ai_mode === 'full') && + currentQuestion.options?.type !== 'ai_assistant' && ( )} - - {/* Bot贸n para abrir chat IA (si es tipo ai_assistant) */} - {currentQuestion.options?.type === 'ai_assistant' && ( - - )}
)} diff --git a/frontend/src/QuestionTypeEditor.jsx b/frontend/src/QuestionTypeEditor.jsx index a4370ad..6f8dbb1 100644 --- a/frontend/src/QuestionTypeEditor.jsx +++ b/frontend/src/QuestionTypeEditor.jsx @@ -197,6 +197,28 @@ export function QuestionTypeEditor({ value, onChange, maxPoints = 1 }) { + {/* Opciones Globales */} +
+

鈿欙笍 Opciones Generales

+
+ {/* Checkbox para campo de observaciones */} + +

+ Si est谩 marcado, el mec谩nico podr谩 agregar notas adicionales en esta pregunta +

+
+
+ {/* Configuraci贸n espec铆fica seg煤n tipo */}
{/* BOOLEAN */}