Mostrar boton de de finalizar chat
This commit is contained in:
@@ -6290,24 +6290,29 @@ function AIAssistantChatModal({ question, inspection, allAnswers, messages, setM
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Botón Continuar después del mensaje del asistente */}
|
||||
{!loading && messages.length > 0 && messages[messages.length - 1].role === 'assistant' && (
|
||||
<div className="flex justify-center mt-4">
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="px-6 py-3 bg-gradient-to-r from-green-600 to-emerald-600 text-white rounded-lg hover:from-green-700 hover:to-emerald-700 transition font-semibold shadow-lg flex items-center gap-2"
|
||||
>
|
||||
<span>✓</span>
|
||||
<span>Continuar con la Inspección</span>
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div ref={chatEndRef} />
|
||||
</div>
|
||||
|
||||
{/* Input */}
|
||||
<div className="border-t p-3 sm:p-4 bg-white rounded-b-xl">
|
||||
{/* Botón Continuar O Input según el estado */}
|
||||
{!loading && messages.length > 0 && messages[messages.length - 1].role === 'assistant' ? (
|
||||
<div className="border-t p-4 sm:p-6 bg-gradient-to-r from-green-50 to-emerald-50 rounded-b-xl">
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
<p className="text-sm text-gray-700 text-center">
|
||||
✓ Verificación completada. Puedes continuar con la inspección o hacer más preguntas.
|
||||
</p>
|
||||
<div className="flex gap-3">
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="px-6 py-3 bg-gradient-to-r from-green-600 to-emerald-600 text-white rounded-lg hover:from-green-700 hover:to-emerald-700 transition font-semibold shadow-lg flex items-center gap-2"
|
||||
>
|
||||
<span>✓</span>
|
||||
<span>Continuar con la Inspección</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="border-t p-3 sm:p-4 bg-white rounded-b-xl">
|
||||
{/* Preview de archivos adjuntos */}
|
||||
{attachedFiles.length > 0 && (
|
||||
<div className="mb-3 flex flex-wrap gap-2">
|
||||
@@ -6390,6 +6395,7 @@ function AIAssistantChatModal({ question, inspection, allAnswers, messages, setM
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Lightbox para visualizar imágenes */}
|
||||
{selectedImage && (
|
||||
|
||||
Reference in New Issue
Block a user