From 61c37a97b8ec0ac30801ac00bcba8a94ad54e767 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Fri, 31 Oct 2025 09:49:49 -0600 Subject: [PATCH] =?UTF-8?q?Fix:=20Corregir=20aplicaci=C3=B3n=20del=20siste?= =?UTF-8?q?ma=20de=20temas=20en=20componentes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Cambiar botones de confirmación (Guardar/Importar) en settings para usar --brand-success - Actualizar color de tab activa en sidebar de --brand-primary a --brand-success - Reemplazar colores hardcoded por variables CSS en badges de tipos de café: * VistaTablaIngresos: Usar var(--coffee-uva/verde/mojado/oreado) * informe-ingresos: Aplicar variables --coffee-* y --status-* - Cambiar text-green-400 por text-[var(--brand-success)] en panorama - Quitar badge de mantenimiento de Comparativa Cosechas Todos los cambios siguen las reglas de THEME_SYSTEM.md para garantizar que los colores respondan correctamente a los cambios de tema del usuario. --- nuxt4-app/app/components/app/AppSidebar.vue | 5 +- .../ingresos/VistaTablaIngresos.vue | 29 +++++-- nuxt4-app/app/pages/informe-ingresos.vue | 82 ++++++++++++------- nuxt4-app/app/pages/panorama.vue | 2 +- nuxt4-app/app/pages/settings.vue | 8 +- 5 files changed, 82 insertions(+), 44 deletions(-) diff --git a/nuxt4-app/app/components/app/AppSidebar.vue b/nuxt4-app/app/components/app/AppSidebar.vue index ad6235b..0f6d23a 100644 --- a/nuxt4-app/app/components/app/AppSidebar.vue +++ b/nuxt4-app/app/components/app/AppSidebar.vue @@ -51,7 +51,7 @@ :ui="{ item: { base: 'text-[var(--brand-text-muted)] hover:text-[var(--brand-primary)] hover:bg-[var(--brand-primary)]/10', - active: 'bg-[var(--brand-primary)]/15 text-[var(--brand-primary)] border-l-2 border-[var(--brand-primary)] font-medium', + active: 'bg-[var(--brand-success)]/15 text-[var(--brand-success)] border-l-2 border-[var(--brand-success)] font-medium', inactive: 'border-l-2 border-transparent' } }" @@ -300,8 +300,7 @@ const navigationPrimary = computed(() => [ label: 'Comparativa Cosechas', icon: 'i-lucide-calendar-range', to: '/comparativa-cosechas', - active: route.path === '/comparativa-cosechas', - badge: { label: 'Mantenimiento', color: 'amber' } + active: route.path === '/comparativa-cosechas' }, { label: 'Explorador de datos', diff --git a/nuxt4-app/app/components/ingresos/VistaTablaIngresos.vue b/nuxt4-app/app/components/ingresos/VistaTablaIngresos.vue index 644e985..14c4b63 100644 --- a/nuxt4-app/app/components/ingresos/VistaTablaIngresos.vue +++ b/nuxt4-app/app/components/ingresos/VistaTablaIngresos.vue @@ -394,34 +394,45 @@ function formatCellValue(value: unknown, column: string, row: any, depth: number }) } - // tipo - badge con colores especiales y gradientes + // tipo - badge con colores especiales usando variables CSS del tema if (column === 'tipo' && typeof value === 'string') { - const tipoConfig: Record = { + const tipoConfig: Record = { 'uva': { - class: 'bg-gradient-to-r from-red-600 via-red-500 to-yellow-600 text-white font-semibold shadow-md', + bgColor: 'var(--coffee-uva)', + textColor: 'white', icon: 'i-lucide-grape' }, 'verde': { - class: 'bg-gradient-to-r from-green-600 via-green-500 to-yellow-500 text-white font-semibold shadow-md', + bgColor: 'var(--coffee-verde)', + textColor: 'white', icon: 'i-lucide-leaf' }, 'mojado': { - class: 'bg-gradient-to-r from-cyan-400 via-blue-300 to-stone-100 text-gray-800 font-semibold shadow-md', + bgColor: 'var(--coffee-mojado)', + textColor: 'white', icon: 'i-lucide-droplet' }, 'oreado': { - class: 'bg-gradient-to-r from-yellow-700 via-amber-300 to-stone-50 text-gray-800 font-semibold shadow-md', + bgColor: 'var(--coffee-oreado)', + textColor: 'white', icon: 'i-lucide-wind' }, 'seco': { - class: 'bg-gradient-to-r from-stone-400 to-stone-200 text-gray-800 font-semibold shadow-md', + bgColor: '#9ca3af', + textColor: 'white', icon: 'i-lucide-sun' } } - const config = tipoConfig[value.toLowerCase()] || { class: 'bg-gray-500 text-white', icon: 'i-lucide-circle' } + const config = tipoConfig[value.toLowerCase()] || { bgColor: '#6b7280', textColor: 'white', icon: 'i-lucide-circle' } - return h('div', { class: 'inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full ' + config.class }, [ + return h('div', { + class: 'inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full font-semibold shadow-md', + style: { + backgroundColor: config.bgColor, + color: config.textColor + } + }, [ h(UIcon, { name: config.icon, class: 'w-4 h-4' }), h('span', {}, upperFirst(value)) ]) diff --git a/nuxt4-app/app/pages/informe-ingresos.vue b/nuxt4-app/app/pages/informe-ingresos.vue index 8469bf1..ca9f355 100644 --- a/nuxt4-app/app/pages/informe-ingresos.vue +++ b/nuxt4-app/app/pages/informe-ingresos.vue @@ -446,14 +446,17 @@ {{ ingreso.cliente_nombre || '-' }} - + {{ ingreso.tipo || '-' }} @@ -467,13 +470,23 @@ L {{ ingreso.total_a_pagar ? ingreso.total_a_pagar.toFixed(2) : '-' }} - + {{ ingreso.estado || '-' }} @@ -615,24 +628,35 @@ {{ punto.fecha_grupo ? new Date(punto.fecha_grupo).toLocaleDateString('es-ES') : '-' }} - + {{ punto.tipo || '-' }} - + {{ punto.estado || '-' }} diff --git a/nuxt4-app/app/pages/panorama.vue b/nuxt4-app/app/pages/panorama.vue index 4ac070d..4c4ef2b 100644 --- a/nuxt4-app/app/pages/panorama.vue +++ b/nuxt4-app/app/pages/panorama.vue @@ -224,7 +224,7 @@
Total Rechazos
-
+
{{ formatCurrency(data.financieros.total_rechazos) }}
diff --git a/nuxt4-app/app/pages/settings.vue b/nuxt4-app/app/pages/settings.vue index 0887697..1a2b3a7 100644 --- a/nuxt4-app/app/pages/settings.vue +++ b/nuxt4-app/app/pages/settings.vue @@ -610,9 +610,11 @@ watch(() => theme.value, (newTheme) => { Restaurar por defecto Guardar cambios @@ -666,8 +668,10 @@ watch(() => theme.value, (newTheme) => { Cancelar Importar