fix: Use airlines CPI benchmark (€3.50) for consistency

Changes CPI_BENCHMARK from €5.00 to €3.50 to match the airlines
industry benchmark used in ExecutiveSummaryTab.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
sujucu70
2026-01-23 13:53:24 +01:00
parent a48aca0a26
commit c9f6db9882

View File

@@ -839,8 +839,10 @@ export const generateAnalysis = async (
d.id === 'economy_cpi' || d.name === 'economy_cpi'
);
if (economyDimIdx >= 0 && globalCPI > 0) {
const CPI_BENCHMARK = 5.00;
// Usar benchmark de aerolíneas (€3.50) para consistencia con ExecutiveSummaryTab
const CPI_BENCHMARK = 3.50;
const cpiDiff = globalCPI - CPI_BENCHMARK;
// Para CPI invertido: menor es mejor
const cpiStatus = cpiDiff <= 0 ? 'positive' : cpiDiff <= 0.5 ? 'neutral' : 'negative';
mapped.dimensions[economyDimIdx].kpi = {
@@ -1104,8 +1106,10 @@ export const generateAnalysisFromCache = async (
const oldKpi = mapped.dimensions[economyDimIdx].kpi;
console.log(' - OLD KPI value:', oldKpi?.value);
const CPI_BENCHMARK = 5.00;
// Usar benchmark de aerolíneas (€3.50) para consistencia con ExecutiveSummaryTab
const CPI_BENCHMARK = 3.50;
const cpiDiff = globalCPI - CPI_BENCHMARK;
// Para CPI invertido: menor es mejor
const cpiStatus = cpiDiff <= 0 ? 'positive' : cpiDiff <= 0.5 ? 'neutral' : 'negative';
mapped.dimensions[economyDimIdx].kpi = {