feat: add stock, vendor and buybox badges to Top Movers table

- Added StockBadge, VendorStockBadge and BuyBoxWarningBadge to TopMovers component
- Updated Dashboard to pass stockMap, vendorStockMap, buyBoxLostMap and top50Mode props
- Updated App.tsx to pass the required maps to Dashboard
- Table now shows 3 new columns: Stock (GMBH), Vendor (Amazon Warehouse), and Buy Box status

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Christian Vidal Wolf
2026-03-16 15:05:11 +01:00
co-authored by Qwen-Coder
parent 167273e659
commit 19f1137a30
3 changed files with 64 additions and 6 deletions
+11 -1
View File
@@ -12,6 +12,10 @@ interface DashboardProps {
contextData?: AggregatedData | null;
adsData?: AdsRecord[];
rawData?: SalesRecord[];
stockMap?: Map<string, number>;
vendorStockMap?: Map<string, { eu: number; uk: number }>;
buyBoxLostMap?: Map<string, { countries: string[]; reasons: Record<string, string> }>;
top50Mode?: 'eu' | 'uk';
}
const COLORS = ['#6366f1', '#ec4899', '#10b981', '#f59e0b', '#8b5cf6', '#0ea5e9'];
@@ -814,7 +818,13 @@ const Dashboard: React.FC<DashboardProps> = ({ data, contextData, adsData = [],
{/* Top Movers Table - Full Width */}
{rawData && rawData.length > 0 && (
<div className="mt-6">
<TopMovers data={rawData} />
<TopMovers
data={rawData}
stockMap={stockMap}
vendorStockMap={vendorStockMap}
buyBoxLostMap={buyBoxLostMap}
top50Mode={top50Mode}
/>
</div>
)}
</div>