feat: display ASIN next to SKU in Weekly Sales grid and enable ASIN search

This commit is contained in:
Christian Vidal Wolf
2026-01-21 17:03:58 +01:00
parent 50fccba432
commit 500eb5aeff
+5 -1
View File
@@ -50,6 +50,7 @@ const WeeklyGrid: React.FC<WeeklyGridProps> = ({ data }) => {
const lowSearch = searchTerm.toLowerCase(); const lowSearch = searchTerm.toLowerCase();
return rows.filter(r => return rows.filter(r =>
r.sku.toLowerCase().includes(lowSearch) || r.sku.toLowerCase().includes(lowSearch) ||
r.asin.toLowerCase().includes(lowSearch) ||
r.title.toLowerCase().includes(lowSearch) || r.title.toLowerCase().includes(lowSearch) ||
r.line.toLowerCase().includes(lowSearch) r.line.toLowerCase().includes(lowSearch)
); );
@@ -213,7 +214,10 @@ const WeeklyGrid: React.FC<WeeklyGridProps> = ({ data }) => {
<tr key={row.id} className="hover:bg-white/[0.02] transition-colors group"> <tr key={row.id} className="hover:bg-white/[0.02] transition-colors group">
<td className="p-3 py-2 sticky left-0 z-10 bg-slate-900 md:bg-slate-900/95 backdrop-blur-sm group-hover:bg-slate-800 border-r border-white/10"> <td className="p-3 py-2 sticky left-0 z-10 bg-slate-900 md:bg-slate-900/95 backdrop-blur-sm group-hover:bg-slate-800 border-r border-white/10">
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-xs font-black text-indigo-400 uppercase tracking-tighter truncate w-[210px]">{row.sku}</span> <div className="flex items-center gap-2 mb-0.5">
<span className="text-xs font-black text-indigo-400 uppercase tracking-tighter truncate max-w-[120px]">{row.sku}</span>
<span className="text-[10px] font-bold text-slate-500 bg-slate-800 px-1.5 py-0.5 rounded border border-white/5">{row.asin}</span>
</div>
<span className="text-[11px] text-white/70 truncate w-[210px] leading-tight mb-1" title={row.title}>{row.title}</span> <span className="text-[11px] text-white/70 truncate w-[210px] leading-tight mb-1" title={row.title}>{row.title}</span>
<span className="text-[9px] text-fuchsia-400/80 font-bold uppercase tracking-widest">{row.line}</span> <span className="text-[9px] text-fuchsia-400/80 font-bold uppercase tracking-widest">{row.line}</span>
</div> </div>