mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 14:15:23 +02:00
Fix Buy Box badge visibility in Grid tab by preserving metadata in pivot; add row z-index
This commit is contained in:
@@ -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'
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user