From a5941c4a43d61e89856db586a935cb3c3e3c2f8f Mon Sep 17 00:00:00 2001 From: josedario87 Date: Tue, 30 Sep 2025 13:44:12 -0600 Subject: [PATCH] panorama facturador mejoras UI/UX --- .../ingresos/InventariosDeposito.vue | 12 +- .../components/ingresos/InversionRestante.vue | 8 +- .../components/ingresos/InversionTotal.vue | 8 +- .../app/components/ingresos/SecosVendidos.vue | 8 +- .../ingresos/TotalesIngresoCompra.vue | 14 +- .../app/components/ingresos/TotalesVerde.vue | 10 +- .../app/components/rechazos/RechazoCard.vue | 8 +- .../rechazos/RechazosSubproductos.vue | 8 +- .../app/composables/useRechazosMetrics.ts | 6 +- nuxt4-app/app/pages/panorama.vue | 271 ++++++++++++++++-- 10 files changed, 289 insertions(+), 64 deletions(-) diff --git a/nuxt4-app/app/components/ingresos/InventariosDeposito.vue b/nuxt4-app/app/components/ingresos/InventariosDeposito.vue index 3c3a259..55d3115 100644 --- a/nuxt4-app/app/components/ingresos/InventariosDeposito.vue +++ b/nuxt4-app/app/components/ingresos/InventariosDeposito.vue @@ -6,21 +6,21 @@
() const formatCurrency = (value: number) => { - return new Intl.NumberFormat('es-GT', { + return new Intl.NumberFormat('es-HN', { style: 'currency', - currency: 'GTQ' - }).format(value) + currency: 'HNL', + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }).format(value).replace('HNL', 'L') } \ No newline at end of file diff --git a/nuxt4-app/app/components/ingresos/InversionTotal.vue b/nuxt4-app/app/components/ingresos/InversionTotal.vue index e61742f..da08cb6 100644 --- a/nuxt4-app/app/components/ingresos/InversionTotal.vue +++ b/nuxt4-app/app/components/ingresos/InversionTotal.vue @@ -38,9 +38,11 @@ defineProps<{ }>() const formatCurrency = (value: number) => { - return new Intl.NumberFormat('es-GT', { + return new Intl.NumberFormat('es-HN', { style: 'currency', - currency: 'GTQ' - }).format(value) + currency: 'HNL', + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }).format(value).replace('HNL', 'L') } \ No newline at end of file diff --git a/nuxt4-app/app/components/ingresos/SecosVendidos.vue b/nuxt4-app/app/components/ingresos/SecosVendidos.vue index 0c3272c..2914515 100644 --- a/nuxt4-app/app/components/ingresos/SecosVendidos.vue +++ b/nuxt4-app/app/components/ingresos/SecosVendidos.vue @@ -36,9 +36,11 @@ defineProps<{ }>() const formatCurrency = (value: number) => { - return new Intl.NumberFormat('es-GT', { + return new Intl.NumberFormat('es-HN', { style: 'currency', - currency: 'GTQ' - }).format(value) + currency: 'HNL', + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }).format(value).replace('HNL', 'L') } \ No newline at end of file diff --git a/nuxt4-app/app/components/ingresos/TotalesIngresoCompra.vue b/nuxt4-app/app/components/ingresos/TotalesIngresoCompra.vue index c452f09..6428091 100644 --- a/nuxt4-app/app/components/ingresos/TotalesIngresoCompra.vue +++ b/nuxt4-app/app/components/ingresos/TotalesIngresoCompra.vue @@ -6,31 +6,31 @@
diff --git a/nuxt4-app/app/components/ingresos/TotalesVerde.vue b/nuxt4-app/app/components/ingresos/TotalesVerde.vue index f6467c0..088bad9 100644 --- a/nuxt4-app/app/components/ingresos/TotalesVerde.vue +++ b/nuxt4-app/app/components/ingresos/TotalesVerde.vue @@ -13,7 +13,7 @@ () const formatCurrency = (value: number) => { - return new Intl.NumberFormat('es-GT', { + return new Intl.NumberFormat('es-HN', { style: 'currency', - currency: 'GTQ' - }).format(value) + currency: 'HNL', + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }).format(value).replace('HNL', 'L') } \ No newline at end of file diff --git a/nuxt4-app/app/components/rechazos/RechazoCard.vue b/nuxt4-app/app/components/rechazos/RechazoCard.vue index a50eb5b..042938a 100644 --- a/nuxt4-app/app/components/rechazos/RechazoCard.vue +++ b/nuxt4-app/app/components/rechazos/RechazoCard.vue @@ -45,9 +45,11 @@ const borderColor = computed(() => { }) const formatCurrency = (value: number) => { - return new Intl.NumberFormat('es-GT', { + return new Intl.NumberFormat('es-HN', { style: 'currency', - currency: 'GTQ' - }).format(value) + currency: 'HNL', + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }).format(value).replace('HNL', 'L') } \ No newline at end of file diff --git a/nuxt4-app/app/components/rechazos/RechazosSubproductos.vue b/nuxt4-app/app/components/rechazos/RechazosSubproductos.vue index a294309..ee8c84b 100644 --- a/nuxt4-app/app/components/rechazos/RechazosSubproductos.vue +++ b/nuxt4-app/app/components/rechazos/RechazosSubproductos.vue @@ -61,9 +61,11 @@ const props = defineProps<{ const totalRechazos = computed(() => props.metrics.totalRechazos) const formatCurrency = (value: number) => { - return new Intl.NumberFormat('es-GT', { + return new Intl.NumberFormat('es-HN', { style: 'currency', - currency: 'GTQ' - }).format(value) + currency: 'HNL', + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }).format(value).replace('HNL', 'L') } \ No newline at end of file diff --git a/nuxt4-app/app/composables/useRechazosMetrics.ts b/nuxt4-app/app/composables/useRechazosMetrics.ts index 9252f13..286a488 100644 --- a/nuxt4-app/app/composables/useRechazosMetrics.ts +++ b/nuxt4-app/app/composables/useRechazosMetrics.ts @@ -30,8 +30,10 @@ export function useRechazosMetrics(rechazos: ComputedRef) { const registros = rechazos.value.filter(r => r.tipo === tipo) const totalCantidad = registros.reduce((sum, r) => sum + (r.cantidad || 0), 0) - const totalCobrado = registros.reduce((sum, r) => sum + (r.total_cobrado || 0), 0) - const precioPromedio = totalCantidad > 0 ? totalCobrado / totalCantidad : 0 + // const totalCobrado = registros.reduce((sum, r) => sum + (r.total_cobrado || 0), 0) DESACTIVADO HASTA NORMALIZAR LOS DATOS DE LA TABLA ORIGINAL, MENCIONAR SI TE TOPAS CON ESTO UN MES DESPUES ESTAMOS EN 1 OCTUBRE 2025 + // const precioPromedio = totalCantidad > 0 ? totalCobrado / totalCantidad : 0 DESACTIVADO HASTA NORMALIZAR LOS DATOS DE LA TABLA ORIGINAL, MENCIONAR SI TE TOPAS CON ESTO UN MES DESPUES ESTAMOS EN 1 OCTUBRE 2025 + const precioPromedio = 10 + const totalCobrado = 100 return { totalCantidad, diff --git a/nuxt4-app/app/pages/panorama.vue b/nuxt4-app/app/pages/panorama.vue index dcfa8d2..f91b18d 100644 --- a/nuxt4-app/app/pages/panorama.vue +++ b/nuxt4-app/app/pages/panorama.vue @@ -1,3 +1,4 @@ +