fix: Handle both economy_cpi and economy_costs dimension IDs

- CPI sync now searches for both IDs (backend uses economy_costs,
  frontend fallback uses economy_cpi)
- DimensionAnalysisTab causal analysis recognizes both IDs
- Ensures consistency across fresh data, cached data, and fallback paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
sujucu70
2026-01-23 11:44:51 +01:00
parent cbea968776
commit c5c88f6f21
2 changed files with 43 additions and 1 deletions

View File

@@ -311,6 +311,7 @@ function generateCausalAnalysis(
break;
case 'economy_cpi':
case 'economy_costs': // También manejar el ID del backend
// Análisis de CPI
if (CPI > 3.5) {
const excessCPI = CPI - CPI_TCO;