Fix: múltiples correcciones de UI y funcionalidad
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m6s

Cambios realizados:

1. Favicon:
   - Actualizar configuración en app.vue para usar iconos PNG correctos
   - Agregar links con tamaños 32x32 y 16x16
   - Actualizar theme-color a #16a34a (verde del proyecto)

2. Modal de Crear Operación:
   - Reestructurar con slots #header y #body para scroll correcto
   - Extraer header del Form.vue y moverlo al modal
   - Eliminar UCard del componente Form.vue
   - Agregar max-h-[80vh] para limitar altura
   - Ahora muestra scrollbar vertical cuando el contenido excede el espacio

3. USelect de filtro de operaciones:
   - Corregir de :options a :items (API correcta de NuxtUI v4)
   - Agregar label-key y value-key
   - Agregar computed selectOptions (igual que en Lotes)
   - Cambiar filtroTipo de ref('') a ref<string | null>(null)
   - Ahora el filtro funciona correctamente

Archivos modificados:
- app/app.vue: Configuración favicon y modal operaciones
- app/components/operaciones/Form.vue: Eliminar UCard
- app/components/operaciones/Table.vue: Corregir USelect
This commit is contained in:
2025-11-22 03:29:27 -06:00
parent 19aa26a955
commit cb0261dad3
4 changed files with 32 additions and 21 deletions

View File

@@ -15,8 +15,10 @@
<div class="flex gap-2">
<USelect
v-model="filtroTipo"
:options="[{ value: '', label: 'Todos los tipos' }, ...TIPOS_OPERACION]"
placeholder="Filtrar por tipo"
:items="selectOptions"
label-key="label"
value-key="value"
searchable
class="w-64"
/>
<UButton
@@ -94,9 +96,14 @@ console.log('🟡 OperacionesTable: useLotes() completado, TIPOS_OPERACION:', TI
const operaciones = ref<Operacion[]>([])
const loading = ref(false)
const filtroTipo = ref('')
const filtroTipo = ref<string | null>(null)
const error = ref<string | null>(null)
const selectOptions = computed(() => [
{ value: null, label: 'Todos los tipos' },
...TIPOS_OPERACION,
])
const columns: ColumnDef<Operacion>[] = [
{ accessorKey: 'tipo', id: 'tipo', header: 'Tipo de Operación' },
{ accessorKey: 'fecha', id: 'fecha', header: 'Fecha' },