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:
@@ -839,8 +839,10 @@ export const generateAnalysis = async (
|
|||||||
d.id === 'economy_cpi' || d.name === 'economy_cpi'
|
d.id === 'economy_cpi' || d.name === 'economy_cpi'
|
||||||
);
|
);
|
||||||
if (economyDimIdx >= 0 && globalCPI > 0) {
|
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;
|
const cpiDiff = globalCPI - CPI_BENCHMARK;
|
||||||
|
// Para CPI invertido: menor es mejor
|
||||||
const cpiStatus = cpiDiff <= 0 ? 'positive' : cpiDiff <= 0.5 ? 'neutral' : 'negative';
|
const cpiStatus = cpiDiff <= 0 ? 'positive' : cpiDiff <= 0.5 ? 'neutral' : 'negative';
|
||||||
|
|
||||||
mapped.dimensions[economyDimIdx].kpi = {
|
mapped.dimensions[economyDimIdx].kpi = {
|
||||||
@@ -1104,8 +1106,10 @@ export const generateAnalysisFromCache = async (
|
|||||||
const oldKpi = mapped.dimensions[economyDimIdx].kpi;
|
const oldKpi = mapped.dimensions[economyDimIdx].kpi;
|
||||||
console.log(' - OLD KPI value:', oldKpi?.value);
|
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;
|
const cpiDiff = globalCPI - CPI_BENCHMARK;
|
||||||
|
// Para CPI invertido: menor es mejor
|
||||||
const cpiStatus = cpiDiff <= 0 ? 'positive' : cpiDiff <= 0.5 ? 'neutral' : 'negative';
|
const cpiStatus = cpiDiff <= 0 ? 'positive' : cpiDiff <= 0.5 ? 'neutral' : 'negative';
|
||||||
|
|
||||||
mapped.dimensions[economyDimIdx].kpi = {
|
mapped.dimensions[economyDimIdx].kpi = {
|
||||||
|
|||||||
Reference in New Issue
Block a user