From 0c634bbc8b6b7fd62926d5f08ebd85121424dfc3 Mon Sep 17 00:00:00 2001 From: Jose Selesan Date: Thu, 27 Aug 2026 10:22:13 -0300 Subject: [PATCH] fix(analysis): don't skip any months for inflation, just check if data exists --- .../components/MonthlyVariationTable.tsx | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/apps/frontend/src/features/analysis/components/MonthlyVariationTable.tsx b/apps/frontend/src/features/analysis/components/MonthlyVariationTable.tsx index 4c58861..e2f50dc 100644 --- a/apps/frontend/src/features/analysis/components/MonthlyVariationTable.tsx +++ b/apps/frontend/src/features/analysis/components/MonthlyVariationTable.tsx @@ -123,15 +123,6 @@ export function MonthlyVariationTable() { const sortedMonths = [...monthsMap.keys()].sort(); - const today = new Date(); - const currentMonth = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, "0")}`; - const lastMonthDate = new Date( - today.getFullYear(), - today.getMonth() - 1, - 1, - ); - const lastCompleteMonth = `${lastMonthDate.getFullYear()}-${String(lastMonthDate.getMonth() + 1).padStart(2, "0")}`; - const calcVariation = ( currentVal: number | null, prevVal: number | null, @@ -160,14 +151,7 @@ export function MonthlyVariationTable() { ); let inflation: number | null = null; - const dayOfMonth = today.getDate(); - const skipLastComplete = dayOfMonth < 14; - if ( - month !== currentMonth && - !(skipLastComplete && month === lastCompleteMonth) - ) { - inflation = inflationMap.get(month) ?? null; - } + inflation = inflationMap.get(month) ?? null; return { month,