diff --git a/nuxt4-app/app/components/metabase/MetabaseCardDisplay.vue b/nuxt4-app/app/components/metabase/MetabaseCardDisplay.vue index 6e8cb05..90cdc04 100644 --- a/nuxt4-app/app/components/metabase/MetabaseCardDisplay.vue +++ b/nuxt4-app/app/components/metabase/MetabaseCardDisplay.vue @@ -87,7 +87,19 @@ -
+ +
+
+ + + +
+

No hay datos

+

La consulta se ejecutó correctamente pero no devolvió resultados.

+
+ + +
{{ JSON.stringify(queryResult.data, null, 2) }}
@@ -155,7 +167,14 @@ async function executeQuery() { try { const result = await $fetch(`/api/metabase/cards/${props.card.id}/query`, { - method: 'POST' + method: 'POST', + body: { + parameters: [ + { type: 'category', target: ['variable', ['template-tag', 'incluir_anulados']], value: [false] }, + { type: 'date/single', target: ['variable', ['template-tag', 'fecha_desde']], value: null }, + { type: 'date/single', target: ['variable', ['template-tag', 'fecha_hasta']], value: null } + ] + } }) queryResult.value = result } catch (e: any) { diff --git a/nuxt4-app/app/components/metabase/MetabaseCardsTable.vue b/nuxt4-app/app/components/metabase/MetabaseCardsTable.vue index 0a8bd78..9b4311e 100644 --- a/nuxt4-app/app/components/metabase/MetabaseCardsTable.vue +++ b/nuxt4-app/app/components/metabase/MetabaseCardsTable.vue @@ -113,7 +113,19 @@ -
+ +
+
+ + + +
+

No hay datos

+

La consulta se ejecutó correctamente pero no devolvió resultados.

+
+ + +
{{ JSON.stringify(currentResult.data, null, 2) }}
@@ -210,7 +222,14 @@ async function executeCard(card: any) { try { const result = await $fetch(`/api/metabase/cards/${card.id}/query`, { - method: 'POST' + method: 'POST', + body: { + parameters: [ + { type: 'category', target: ['variable', ['template-tag', 'incluir_anulados']], value: [false] }, + { type: 'date/single', target: ['variable', ['template-tag', 'fecha_desde']], value: null }, + { type: 'date/single', target: ['variable', ['template-tag', 'fecha_hasta']], value: null } + ] + } }) currentResult.value = result showResults.value = true