diff --git a/components/VendorStockBadge.tsx b/components/VendorStockBadge.tsx index 65864d5..d8996fd 100644 --- a/components/VendorStockBadge.tsx +++ b/components/VendorStockBadge.tsx @@ -76,7 +76,10 @@ export const VendorStockBadge: React.FC = ({ asin, vendor {stock.toLocaleString('de-DE')} - + {wocText} diff --git a/services/dataProcessor.ts b/services/dataProcessor.ts index c2ae5fe..cb501eb 100644 --- a/services/dataProcessor.ts +++ b/services/dataProcessor.ts @@ -1820,12 +1820,8 @@ export const calculateVelocityMap = (data: SalesRecord[]): Map = const latestWeek = yearData.length > 0 ? Math.max(...yearData.map(r => r.week).filter(w => w !== undefined) as number[]) : 0; const last4WeeksKeys = new Set(); - // Start from previous week to ensure we use COMPLETED weeks - // If raw data includes current partial week, we skip it. - const startWeek = latestWeek - 1; - for (let i = 0; i < 4; i++) { - let w = startWeek - i; + let w = latestWeek - i; let y = latestYear; if (w <= 0) { w = 52 + w;