v1.0.65 Backend / v1.0.59 Frontend - Fix client_name + Mejoras en carga de fotos
Backend (1.0.65): - Fix: Todas las referencias client_name cambiadas a order_number - Actualizado webhook n8n: "cliente" → "pedido" - Actualizado contexto IA: "Cliente" → "Nº Pedido" - PDF ahora muestra "Nº de Pedido" en lugar de "Cliente" Frontend (1.0.59): - 📸 NUEVO: Vista previa de fotos cargadas (grid 3 columnas con thumbnails) - 📸 NUEVO: Botón "✕" para eliminar fotos individuales - 📸 NUEVO: Botón manual "🤖 Analizar con IA" (no auto-análisis) - 📸 MEJORA: Permite cargar múltiples fotos respetando max_photos - 📸 MEJORA: Input file solo required si no hay fotos cargadas - 📸 MEJORA: Muestra contador "X foto(s) cargada(s)" - 🔧 Fix: Ya no analiza automáticamente al subir (espera click en botón) - 🔧 Fix: Permite re-cargar fotos eliminando las anteriores - 🔧 Fix: Previene exceder max_photos mostrando alerta UX Improvements: - Usuario sube 1-3 fotos y las ve en preview - Puede eliminar individualmente con hover + click en ✕ - Click en "Analizar con IA" procesa todas las fotos juntas - Análisis secuencial con summary multi-imagen Nota: No requiere migración (ya ejecutada en v1.0.64)
This commit is contained in:
@@ -57,7 +57,7 @@ def send_answer_notification(answer, question, mechanic, db):
|
||||
"vehiculo_placa": inspection.vehicle_plate,
|
||||
"vehiculo_marca": inspection.vehicle_brand,
|
||||
"vehiculo_modelo": inspection.vehicle_model,
|
||||
"cliente": inspection.client_name,
|
||||
"pedido": inspection.order_number,
|
||||
"or_number": inspection.or_number
|
||||
},
|
||||
"mecanico": {
|
||||
@@ -153,7 +153,7 @@ def send_completed_inspection_to_n8n(inspection, db):
|
||||
"modelo": inspection.vehicle_model,
|
||||
"kilometraje": inspection.vehicle_km
|
||||
},
|
||||
"cliente": inspection.client_name,
|
||||
"pedido": inspection.order_number,
|
||||
"mecanico": {
|
||||
"id": mechanic.id if mechanic else None,
|
||||
"nombre": mechanic.full_name if mechanic else None,
|
||||
@@ -204,7 +204,7 @@ def send_completed_inspection_to_n8n(inspection, db):
|
||||
# No lanzamos excepción para no interrumpir el flujo normal
|
||||
|
||||
|
||||
BACKEND_VERSION = "1.0.64"
|
||||
BACKEND_VERSION = "1.0.65"
|
||||
app = FastAPI(title="Checklist Inteligente API", version=BACKEND_VERSION)
|
||||
|
||||
# S3/MinIO configuration
|
||||
@@ -1318,7 +1318,7 @@ def generate_inspection_pdf(inspection_id: int, db: Session) -> str:
|
||||
inspection_data = [
|
||||
[Paragraph("<b>👤 INFORMACIÓN DEL CLIENTE</b>", info_style)],
|
||||
[Table([
|
||||
[Paragraph("<b>Cliente:</b>", small_style), Paragraph(f"{inspection.client_name or 'N/A'}", info_style)],
|
||||
[Paragraph("<b>Nº Pedido:</b>", small_style), Paragraph(f"{inspection.order_number or 'N/A'}", info_style)],
|
||||
[Paragraph("<b>OR N°:</b>", small_style), Paragraph(f"{inspection.or_number or 'N/A'}", info_style)],
|
||||
[Paragraph("<b>Mecánico:</b>", small_style), Paragraph(f"{mechanic.full_name if mechanic else 'N/A'}", info_style)],
|
||||
[Paragraph("<b>Cód. Operario:</b>", small_style), Paragraph(f"{inspection.mechanic_employee_code or 'N/A'}", info_style)],
|
||||
@@ -2175,7 +2175,7 @@ INFORMACIÓN DEL VEHÍCULO INSPECCIONADO:
|
||||
- Modelo: {inspection.vehicle_model}
|
||||
- Placa: {inspection.vehicle_plate}
|
||||
- Kilometraje: {inspection.vehicle_km} km
|
||||
- Cliente: {inspection.client_name}
|
||||
- Nº Pedido: {inspection.order_number}
|
||||
- OR/Orden: {inspection.or_number}
|
||||
"""
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user