Fix Buy Box badge visibility in Grid tab by preserving metadata in pivot; add row z-index

This commit is contained in:
Christian Vidal Wolf
2026-01-29 15:43:18 +01:00
parent fcc8096b01
commit b54f6f8030
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1087,7 +1087,7 @@ const DataGrid: React.FC<DataGridProps> = ({ data, hasCustomerFilter, adsData, s
</thead> </thead>
<tbody className="divide-y divide-border text-slate-300"> <tbody className="divide-y divide-border text-slate-300">
{paginatedRows.map((row) => ( {paginatedRows.map((row) => (
<tr key={row.id} className="hover:bg-slate-800/50 transition-colors group"> <tr key={row.id} className="hover:bg-slate-800/50 transition-colors group relative hover:z-50">
{effectiveDimensions.map(dim => ( {effectiveDimensions.map(dim => (
<td key={dim} className="px-4 py-3 font-medium text-slate-200 break-words max-w-xs"> <td key={dim} className="px-4 py-3 font-medium text-slate-200 break-words max-w-xs">
{dim === 'title' {dim === 'title'
+6 -6
View File
@@ -1308,12 +1308,12 @@ export const pivotSalesData = (data: any[], dimensions: string[] = ['title', 'cu
if (!map.has(key)) { if (!map.has(key)) {
map.set(key, { map.set(key, {
id: key, id: key,
customer: dimensions.includes('customer') ? (record.customer || record.marketplace || '') : '', customer: record.customer || record.marketplace || '',
line: dimensions.includes('line') ? record.line : '', line: record.line || '',
title: dimensions.includes('title') ? record.title : '', title: record.title || '',
articleName: dimensions.includes('articleName') ? record.articleName : '', articleName: record.articleName || '',
sku: dimensions.includes('sku') ? record.sku : '', sku: record.sku || '',
asin: dimensions.includes('asin') ? record.asin : '', asin: record.asin || '',
// Initialize 12 months with empty year maps // Initialize 12 months with empty year maps
months: Array(12).fill(null).map((_, i) => ({ months: Array(12).fill(null).map((_, i) => ({
monthIndex: i, monthIndex: i,