Frontend v1.0.82
1. Eliminado campo duplicado de "Observaciones": ❌ Antes: Había 2 campos de observaciones (uno general y uno dentro de fotos) ✅ Ahora: Solo 1 campo de observaciones (el general) 2. Nuevo tipo de pregunta "📸 Solo Fotografía" (photo_only): Comportamiento: Solo muestra el título de la pregunta y el campo para adjuntar fotos NO muestra: Campo de respuesta ni campo de observaciones Ideal para: Documentación fotográfica pura (ej: "Fotografía del VIN", "Estado general del vehículo")
This commit is contained in:
@@ -4737,44 +4737,48 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl
|
||||
</div>
|
||||
|
||||
<div className="space-y-4">
|
||||
{/* Answer input based on type */}
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
Respuesta *
|
||||
</label>
|
||||
|
||||
<QuestionAnswerInput
|
||||
question={currentQuestion}
|
||||
value={answers[currentQuestion.id]?.value}
|
||||
onChange={(newValue) => {
|
||||
setAnswers(prev => ({
|
||||
...prev,
|
||||
[currentQuestion.id]: { ...prev[currentQuestion.id], value: newValue }
|
||||
}))
|
||||
}}
|
||||
onSave={() => setTimeout(() => saveAnswer(currentQuestion.id), 500)}
|
||||
/>
|
||||
</div>
|
||||
{/* Answer input based on type - NO mostrar para photo_only */}
|
||||
{currentQuestion.options?.type !== 'photo_only' && (
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
Respuesta *
|
||||
</label>
|
||||
|
||||
<QuestionAnswerInput
|
||||
question={currentQuestion}
|
||||
value={answers[currentQuestion.id]?.value}
|
||||
onChange={(newValue) => {
|
||||
setAnswers(prev => ({
|
||||
...prev,
|
||||
[currentQuestion.id]: { ...prev[currentQuestion.id], value: newValue }
|
||||
}))
|
||||
}}
|
||||
onSave={() => setTimeout(() => saveAnswer(currentQuestion.id), 500)}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Observations */}
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
Observaciones (opcional)
|
||||
</label>
|
||||
<textarea
|
||||
value={answers[currentQuestion.id]?.observations || ''}
|
||||
onChange={(e) => setAnswers(prev => ({
|
||||
...prev,
|
||||
[currentQuestion.id]: {
|
||||
...(prev[currentQuestion.id] || { value: '', observations: '', photos: [] }),
|
||||
observations: e.target.value
|
||||
}
|
||||
}))}
|
||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500"
|
||||
rows="2"
|
||||
placeholder="Notas adicionales..."
|
||||
/>
|
||||
</div>
|
||||
{/* Observations - NO mostrar para photo_only */}
|
||||
{currentQuestion.options?.type !== 'photo_only' && (
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
Observaciones (opcional)
|
||||
</label>
|
||||
<textarea
|
||||
value={answers[currentQuestion.id]?.observations || ''}
|
||||
onChange={(e) => setAnswers(prev => ({
|
||||
...prev,
|
||||
[currentQuestion.id]: {
|
||||
...(prev[currentQuestion.id] || { value: '', observations: '', photos: [] }),
|
||||
observations: e.target.value
|
||||
}
|
||||
}))}
|
||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500"
|
||||
rows="2"
|
||||
placeholder="Notas adicionales..."
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Photos */}
|
||||
{currentQuestion.allow_photos && (
|
||||
@@ -4864,13 +4868,6 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Comentarios removidos que revelaban IA */}
|
||||
{checklist.ai_mode === 'assisted' && answers[currentQuestion.id]?.observations.includes('[IA Sugiere') && (
|
||||
<span className="text-blue-600">✓ Sugerencia generada</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user