feat: improve Week Coverage visibility, calculation robustness, and add aggregate WOC to grid totals and forecast view

This commit is contained in:
Christian Vidal Wolf
2026-04-17 12:35:25 +02:00
parent aa4a916c5d
commit 38f16aac89
4 changed files with 83 additions and 14 deletions
+8 -6
View File
@@ -37,9 +37,9 @@ export const VendorStockBadge: React.FC<VendorStockBadgeProps> = ({ asin, vendor
const themeClasses = "bg-slate-200 text-slate-800 border-slate-300 shadow-sm";
return (
<div className="flex flex-col items-center gap-1 justify-center min-w-[60px]">
<div className="flex flex-col items-center gap-0.5 justify-center min-w-[70px]">
<div
className={`inline-flex items-center gap-1 px-2 py-0.5 rounded border text-[10px] font-bold transition-all hover:scale-105 active:scale-95 cursor-default ${themeClasses}`}
className={`inline-flex items-center gap-1.5 px-2 py-0.5 rounded border text-[10px] font-bold transition-all hover:scale-105 active:scale-95 cursor-default ${themeClasses}`}
title={`Stock en Amazon Warehouse (${mode.toUpperCase()}): ${stock}`}
>
<AmazonSmileIcon className="w-3.5 h-3.5" />
@@ -48,12 +48,14 @@ export const VendorStockBadge: React.FC<VendorStockBadgeProps> = ({ asin, vendor
<span>{stock.toLocaleString('de-DE')}</span>
</div>
</div>
<span
className={`text-[9px] font-black uppercase tracking-tight whitespace-nowrap ${wocColor}`}
<div
className={`px-1.5 py-0.5 rounded-sm bg-slate-900/40 border border-white/5 shadow-inner`}
title={`Avg Sales (4wk): ${velocity.toFixed(2)} | Stock: ${stock}`}
>
{wocText}
</span>
<span className={`text-[10px] font-black uppercase tracking-tighter whitespace-nowrap block ${wocColor}`}>
{wocText}
</span>
</div>
</div>
);
};