From 028d7e54c8d987560479f9d2af7ccdf02e01b418 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Sat, 22 Nov 2025 02:07:57 -0600 Subject: [PATCH] mejoras UI 4 --- nuxt4/app/app.vue | 32 +++++++++++++++++-- nuxt4/app/components/lotes/Card.vue | 6 ++-- nuxt4/app/components/lotes/Trazabilidad.vue | 24 +++++++------- .../components/lotes/TrazabilidadGraph.vue | 32 +++++++++++++------ 4 files changed, 67 insertions(+), 27 deletions(-) diff --git a/nuxt4/app/app.vue b/nuxt4/app/app.vue index c6a36e6..fe7b605 100644 --- a/nuxt4/app/app.vue +++ b/nuxt4/app/app.vue @@ -150,7 +150,11 @@ + + + + + @@ -194,9 +209,11 @@ const showLoteDetailModal = ref(false) const showTrazabilidadModal = ref(false) const showCreateLoteModal = ref(false) const showCreateOperacionModal = ref(false) +const showOperacionDetailModal = ref(false) // Estados de datos const selectedLote = ref(null) +const selectedOperacion = ref(null) const trazabilidadLoteId = ref(null) // Handlers para Lotes @@ -240,8 +257,8 @@ const handleLoteFormSuccess = () => { // Handlers para Operaciones const handleViewOperacion = (operacion: Operacion) => { - // TODO: Implementar vista de detalle de operación si es necesario - console.log('Ver operación:', operacion) + selectedOperacion.value = operacion + showOperacionDetailModal.value = true } const handleOperacionFormSuccess = () => { @@ -249,6 +266,15 @@ const handleOperacionFormSuccess = () => { // Las tablas se recargarán automáticamente } +const closeOperacionDetailModal = () => { + showOperacionDetailModal.value = false + selectedOperacion.value = null +} +const closeOperacionDetailModal = () => { + showOperacionDetailModal.value = false + selectedOperacion.value = null +} + // ⚠️⚠️⚠️ FUNCIONES DE DEBUG - TEMPORALES ⚠️⚠️⚠️ // NO ELIMINAR SIN CONSULTAR A DARIO/DRAGANEL/NUCLEO000 const resettingDB = ref(false) diff --git a/nuxt4/app/components/lotes/Card.vue b/nuxt4/app/components/lotes/Card.vue index 485e92e..f43bd00 100644 --- a/nuxt4/app/components/lotes/Card.vue +++ b/nuxt4/app/components/lotes/Card.vue @@ -55,8 +55,10 @@

Información Adicional

- -
{{ JSON.stringify(lote.meta, null, 2) }}
+ +
+{{ JSON.stringify(lote.meta, null, 2) }}
+          
diff --git a/nuxt4/app/components/lotes/Trazabilidad.vue b/nuxt4/app/components/lotes/Trazabilidad.vue index 2ea062f..d28322e 100644 --- a/nuxt4/app/components/lotes/Trazabilidad.vue +++ b/nuxt4/app/components/lotes/Trazabilidad.vue @@ -21,20 +21,20 @@
-
-
-

{{ trazabilidad.estadisticas.total_ancestros }}

-

Lotes ancestros

+
+
+

Lotes ancestros

+

{{ trazabilidad.estadisticas.total_ancestros }}

-
-

{{ trazabilidad.estadisticas.profundidad_maxima }}

-

Niveles de profundidad

+
+

Niveles de profundidad

+

{{ trazabilidad.estadisticas.profundidad_maxima }}

-
-

+

+

Kilos iniciales

+

{{ trazabilidad.estadisticas.kg_iniciales.toLocaleString('es-AR') }} kg

-

Kilos iniciales

@@ -44,11 +44,11 @@

Historial

-
+
- + @@ -208,6 +218,7 @@ const edges = computed(() => { to: string fromPos: { x: number; y: number } toPos: { x: number; y: number } + midPos: { x: number; y: number } }[] = [] for (const row of props.historial) { @@ -220,6 +231,7 @@ const edges = computed(() => { to: toNode.id, fromPos: { x: fromNode.x, y: fromNode.y + nodeBox.height / 2 }, toPos: { x: toNode.x, y: toNode.y - nodeBox.height / 2 }, + midPos: { x: fromNode.x, y: (fromNode.y + toNode.y) / 2 }, }) } }