Add Annual Forecast column to Fc 26 tab and Excel export

This commit is contained in:
Christian Vidal Wolf
2026-01-28 16:43:18 +01:00
parent bc6ec6dff8
commit 98e8bb3904
+14 -3
View File
@@ -105,6 +105,13 @@ const ForecastRow: React.FC<{
</div>
</div>
</td>
{/* Annual Forecast */}
<td className="px-6 py-4 text-center">
<span className="text-sm font-bold text-slate-400">
{(item.annualForecast || 0).toLocaleString('de-DE')}
</span>
</td>
{/* Forecast (Period) */}
<td className="px-6 py-4 text-center">
<span className="text-sm font-bold text-slate-400">
@@ -279,6 +286,7 @@ const ForecastView: React.FC<ForecastViewProps> = ({
ASIN: p.asin,
Title: p.title,
Line: p.line,
'Annual Forecast': p.annualForecast,
'Forecast (Period)': p.forecastPeriod,
'Actual Units (2026)': p.actualUnits,
'FC 26 Achievement (%)': p.fcAchievement,
@@ -392,19 +400,22 @@ const ForecastView: React.FC<ForecastViewProps> = ({
<table className="w-full text-left border-collapse relative">
<thead className="sticky top-0 z-20 bg-slate-950 shadow-sm text-[10px] font-black text-slate-500 uppercase tracking-wider">
<tr>
<th className="px-6 py-4 text-white w-[35%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('sku')}>
<th className="px-6 py-4 text-white w-[30%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('sku')}>
Product Info <SortIndicator column="sku" />
</th>
<th className="px-6 py-4 text-center w-[12%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('annualForecast')}>
Annual Forecast <SortIndicator column="annualForecast" />
</th>
<th className="px-6 py-4 text-center w-[12%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('forecastPeriod')}>
Forecast (Period) <SortIndicator column="forecastPeriod" />
</th>
<th className="px-6 py-4 text-center w-[12%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('actualUnits')}>
Actual Units 2026 <SortIndicator column="actualUnits" />
</th>
<th className="px-6 py-4 text-center w-[15%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('fcAchievement')}>
<th className="px-6 py-4 text-center w-[12%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('fcAchievement')}>
FC 26 Achievement <SortIndicator column="fcAchievement" />
</th>
<th className="px-6 py-4 text-center w-[26%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('ytdAchievement')}>
<th className="px-6 py-4 text-center w-[22%] cursor-pointer hover:bg-white/5 transition-colors" onClick={() => handleSort('ytdAchievement')}>
YTD Achievement <SortIndicator column="ytdAchievement" />
</th>
</tr>