diff --git a/Untitled.png b/Untitled.png new file mode 100644 index 0000000..57956f7 Binary files /dev/null and b/Untitled.png differ diff --git a/nuxt4-app/app/components/DateRangeSelector.vue b/nuxt4-app/app/components/DateRangeSelector.vue index d9ef53d..258ed15 100644 --- a/nuxt4-app/app/components/DateRangeSelector.vue +++ b/nuxt4-app/app/components/DateRangeSelector.vue @@ -26,11 +26,11 @@
- +
- +
@@ -114,24 +114,21 @@ function selectPreset(preset: PresetValue) { } } -function onManualDateChange(event: Event) { +function onManualDateChange(type: 'desde' | 'hasta', event: Event) { const target = event.target as HTMLInputElement - const value = target.value + const value = target.value || null // Si el usuario modifica las fechas manualmente, cambiar a "Personalizado" emit('update:selectedPreset', 'custom') - // Actualizar la fecha correspondiente según el input - if (target.type === 'date') { - const label = target.labels?.[0]?.textContent - if (label?.includes('desde')) { - emit('update:fechaDesde', value) - } else if (label?.includes('hasta')) { - emit('update:fechaHasta', value) - } + // Actualizar la fecha correspondiente + if (type === 'desde') { + emit('update:fechaDesde', value) + } else { + emit('update:fechaHasta', value) } - console.log('Manual date change, preset set to custom') + console.log(`Manual date change (${type}):`, value, 'preset set to custom') } function clearPreset() { diff --git a/nuxt4-app/app/components/MetadatosCard.vue b/nuxt4-app/app/components/MetadatosCard.vue index ff8c5a3..c57c33a 100644 --- a/nuxt4-app/app/components/MetadatosCard.vue +++ b/nuxt4-app/app/components/MetadatosCard.vue @@ -1,20 +1,106 @@