diff --git a/backend/app/main.py b/backend/app/main.py index 9331df5..f9440f6 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -276,7 +276,7 @@ def extract_pdf_text_smart(pdf_content: bytes, max_chars: int = None) -> dict: } -BACKEND_VERSION = "1.0.97" +BACKEND_VERSION = "1.0.98" app = FastAPI(title="Checklist Inteligente API", version=BACKEND_VERSION) # S3/MinIO configuration diff --git a/frontend/package.json b/frontend/package.json index 987add7..9919164 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "checklist-frontend", "private": true, - "version": "1.2.1", + "version": "1.2.2", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/public/service-worker.js b/frontend/public/service-worker.js index 65c098a..33e8bd9 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.2.1'; +const CACHE_NAME = 'ayutec-v1.2.2'; const urlsToCache = [ '/', '/index.html' diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index a8dea73..b8e2115 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -5175,33 +5175,40 @@ function InspectionModal({ checklist, existingInspection, user, onClose, onCompl {answers[currentQuestion.id].photos.length} archivo(s) cargado(s):
- {answers[currentQuestion.id].photos.map((photo, index) => ( -
- {photo.type === 'application/pdf' ? ( -
- 📝 - PDF + {answers[currentQuestion.id].photos.map((photo, index) => { + // Determinar si es un archivo nuevo (File/Blob) o una URL existente (string) + const isFile = photo instanceof File || photo instanceof Blob + const isPDF = isFile ? photo.type === 'application/pdf' : photo.endsWith('.pdf') + const photoURL = isFile ? URL.createObjectURL(photo) : photo + + return ( +
+ {isPDF ? ( +
+ 📝 + PDF +
+ ) : ( + {`Foto + )} + +
+ {isPDF ? (isFile ? photo.name : 'PDF') : `Foto ${index + 1}`}
- ) : ( - {`Foto - )} - -
- {photo.type === 'application/pdf' ? photo.name : `Foto ${index + 1}`}
-
- ))} + ) + })}
{/* Analyze Button - Solo para ai_mode assisted/full y NO para ai_assistant */} diff --git a/frontend/src/Sidebar.jsx b/frontend/src/Sidebar.jsx index 85c36b5..659ca9c 100644 --- a/frontend/src/Sidebar.jsx +++ b/frontend/src/Sidebar.jsx @@ -153,7 +153,7 @@ export default function Sidebar({ user, activeTab, setActiveTab, sidebarOpen, se className="w-10 h-10 object-contain bg-white rounded p-1" />

- Ayutec v1.2.1 + Ayutec v1.2.2