fix: month order - Apr first at top, then subsequent months
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run

This commit is contained in:
Manohar Gupta 2026-05-16 12:07:19 +05:30
parent 96ddb2fa60
commit 27866e86f0

View file

@ -657,9 +657,9 @@ function HourlyGenerationSheet({ hourly, codYear }: { hourly: HourlyData; codYea
{hasWind && <span className="text-blue-700 w-24">{Math.round(windYr).toLocaleString()} MWh</span>} {hasWind && <span className="text-blue-700 w-24">{Math.round(windYr).toLocaleString()} MWh</span>}
</button> </button>
{/* Month rows - reverse order (Apr first for Indian FY) */} {/* Month rows - forward order (Apr first, then subsequent months) */}
{isYearExpanded && [...Array(12)].map((_, mi) => { {isYearExpanded && [...Array(12)].map((_, mi) => {
const pos = 11 - mi; // Reverse: 11->0 gives Apr first const pos = mi; // Forward: 0=Apr, 1=May, etc.
const month = monthPositions[pos]; const month = monthPositions[pos];
const monthKey = `${year}-${month}`; const monthKey = `${year}-${month}`;
const isMonthExpanded = expandedMonths.has(monthKey); const isMonthExpanded = expandedMonths.has(monthKey);