Fix: Corrected 2026 revenue discrepancy, resolved WeeklyGrid initialization crash, and restored Week Coverage data

This commit is contained in:
Christian Vidal Wolf
2026-04-20 12:54:40 +02:00
parent 11ddcb16c5
commit 1e7c88ffad
5 changed files with 440 additions and 417 deletions
+4 -3
View File
@@ -11,16 +11,17 @@ interface VendorStockBadgeProps {
export const VendorStockBadge: React.FC<VendorStockBadgeProps> = ({ asin, vendorStockMap, mode, avgWeeklySales }) => {
if (!asin) return null;
const stockData = vendorStockMap?.get(asin.toUpperCase());
const normalizedAsin = asin.trim().toUpperCase();
const stockData = vendorStockMap?.get(normalizedAsin);
if (!stockData) {
return (
<div className="flex flex-col items-center gap-0.5 justify-center min-w-[70px] opacity-40 group-hover:opacity-100 transition-opacity" title={`Inventory data missing for ASIN: ${asin}`}>
<div className="flex flex-col items-center gap-0.5 justify-center min-w-[70px] opacity-40 group-hover:opacity-100 transition-opacity" title={`Inventory data missing for ASIN: ${normalizedAsin}`}>
<div className="text-[10px] font-bold text-slate-500 bg-slate-800/50 px-2 py-0.5 rounded border border-white/5">
No Data
</div>
<div className="px-1.5 py-0.5 rounded-sm bg-slate-900/20 border border-white/5">
<span className="text-[10px] font-black text-slate-600">-</span>
<span className="text-[10px] font-black text-slate-700">-</span>
</div>
</div>
);