Add ASIN column to Product Descriptions

This commit is contained in:
Christian Vidal Wolf
2026-04-09 16:20:44 +02:00
parent 80fff047ab
commit db69ada011
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -29,6 +29,7 @@ export function ProductDescriptions({ data, onEdit, rowStatuses }: ProductDescri
const [columnWidths, setColumnWidths] = useState<Record<number, number>>({
[COLUMNS.ARTICLE_NO]: 100,
[COLUMNS.ARTICLE_NAME]: 250,
[COLUMNS.ASIN]: 150,
[COLUMNS.LINE]: 80,
[COLUMNS.LICENSE]: 120,
[COLUMNS.CLASSIFICATION]: 100,
@@ -284,6 +285,7 @@ export function ProductDescriptions({ data, onEdit, rowStatuses }: ProductDescri
{[
{ col: COLUMNS.ARTICLE_NO, label: 'Article No.' },
{ col: COLUMNS.ARTICLE_NAME, label: 'Article Name' },
{ col: COLUMNS.ASIN, label: 'ASIN' },
{ col: COLUMNS.LINE, label: 'Line' },
{ col: COLUMNS.LICENSE, label: 'License' },
{ col: COLUMNS.CLASSIFICATION, label: 'Classification' },
@@ -361,6 +363,7 @@ export function ProductDescriptions({ data, onEdit, rowStatuses }: ProductDescri
>
<td className="px-4 py-3 font-mono text-slate-300 text-xs truncate" style={{ width: columnWidths[COLUMNS.ARTICLE_NO] }}>{row[COLUMNS.ARTICLE_NO]}</td>
<td className="px-4 py-3 font-medium text-white truncate" style={{ width: columnWidths[COLUMNS.ARTICLE_NAME] }} title={row[COLUMNS.ARTICLE_NAME]}>{row[COLUMNS.ARTICLE_NAME]}</td>
<td className="px-4 py-3 font-mono text-slate-300 text-xs truncate" style={{ width: columnWidths[COLUMNS.ASIN] }} title={row[COLUMNS.ASIN]}>{row[COLUMNS.ASIN] || '—'}</td>
<td className="px-4 py-3 text-slate-300 text-xs truncate" style={{ width: columnWidths[COLUMNS.LINE] }}>{row[COLUMNS.LINE]}</td>
<td className="px-4 py-3 text-slate-300 text-xs truncate" style={{ width: columnWidths[COLUMNS.LICENSE] }} title={row[COLUMNS.LICENSE]}>{row[COLUMNS.LICENSE] || '—'}</td>
<td className="px-4 py-3 truncate" style={{ width: columnWidths[COLUMNS.CLASSIFICATION] }}>
@@ -391,7 +394,7 @@ export function ProductDescriptions({ data, onEdit, rowStatuses }: ProductDescri
})}
{paginatedData.length === 0 && (
<tr>
<td colSpan={9} className="px-4 py-8 text-center text-slate-500">
<td colSpan={10} className="px-4 py-8 text-center text-slate-500">
No products found matching the criteria.
</td>
</tr>
+2 -1
View File
@@ -33,5 +33,6 @@ export const COLUMNS = {
INNER_H: 44,
OUTER_W: 47,
OUTER_L: 48,
OUTER_H: 49
OUTER_H: 49,
ASIN: 50
};