Fix: corregir tipos de parámetros en queries de Metabase
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 47s

Problema:
- Las queries de Metabase fallaban con error 500 al ejecutarse desde metabase-debug
- Metabase rechazaba los parámetros porque usaban tipos simples en lugar de tipos con operadores

Solución:
- Actualizar mapeo de tipos de parámetros en MetabaseCardDisplay.vue
- boolean → boolean/=
- date → date/single
- number → number/=
- text → string/=

Esto corrige el error "Tipo de parámetro no válido :text para el parámetro 'cliente_ids'"
This commit is contained in:
2025-10-29 17:30:12 -06:00
parent 2e58a16f4d
commit 76eaa5fd6a

View File

@@ -324,7 +324,7 @@ async function executeQuery() {
// Build parameters from current form values
for (const [tagName, tagConfig] of Object.entries(templateTags.value)) {
const config = tagConfig as any
let paramType = 'text'
let paramType = 'string/='
let paramValue = parameterValues.value[tagName]
// Determine parameter type based on tag type
@@ -332,12 +332,14 @@ async function executeQuery() {
paramType = 'date/single'
paramValue = parameterValues.value[tagName] || null
} else if (config.type === 'boolean') {
paramType = 'boolean'
paramType = 'boolean/='
paramValue = parameterValues.value[tagName]
} else if (config.type === 'text' && (tagName.toLowerCase().includes('fecha') || config?.['display-name']?.toLowerCase().includes('fecha'))) {
// Si es tipo text pero parece una fecha, enviar como text
paramType = 'text'
paramValue = parameterValues.value[tagName] || ''
} else if (config.type === 'number') {
paramType = 'number/='
paramValue = parameterValues.value[tagName] || null
} else if (config.type === 'text') {
paramType = 'string/='
paramValue = parameterValues.value[tagName] || null
}
parameters.push({