fix(analysis): only skip inflation for current month, not last complete month

The last complete month's inflation is usually available by the 14th of the
current month. Previously July was always skipped even though data exists.
This commit is contained in:
Jose Selesan
2026-08-27 10:21:39 -03:00
parent 66ab56b46a
commit e32131d32e

View File

@@ -160,7 +160,12 @@ export function MonthlyVariationTable() {
);
let inflation: number | null = null;
if (month !== currentMonth && month !== lastCompleteMonth) {
const dayOfMonth = today.getDate();
const skipLastComplete = dayOfMonth < 14;
if (
month !== currentMonth &&
!(skipLastComplete && month === lastCompleteMonth)
) {
inflation = inflationMap.get(month) ?? null;
}