From 311d363e3151f85d54fc14ea446ab19c6495091f Mon Sep 17 00:00:00 2001 From: ronalds Date: Thu, 4 Dec 2025 09:19:13 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Versiones=20actualizadas:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Frontend: v1.2.1 → v1.2.2 Backend: v1.0.97 → v1.0.98 Cambios en v1.2.2 / v1.0.98: ✅ Fix crítico: Error createObjectURL al continuar inspecciones existentes ✅ Soporte para fotos como File (nuevas) y URL string (existentes) --- backend/app/main.py | 2 +- frontend/package.json | 2 +- frontend/public/service-worker.js | 2 +- frontend/src/App.jsx | 57 +++++++++++++++++-------------- frontend/src/Sidebar.jsx | 2 +- 5 files changed, 36 insertions(+), 29 deletions(-) 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