mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 12:35:24 +02:00
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:
co-authored by
Qwen-Coder
parent
167273e659
commit
19f1137a30
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user