feat: add Issues column to Pricing view showing unit/weight errors per row

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Vidal Wolf
2026-04-22 14:34:10 +02:00
co-authored by Claude Sonnet 4.6
parent 10a2b3effd
commit 2c08a6593a
+19
View File
@@ -1057,6 +1057,10 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit,
); );
})} })}
<th style={{ width: 180 }} className="text-left px-3 py-3 text-xs font-semibold text-red-400 uppercase tracking-wider border-b border-slate-700 whitespace-nowrap relative">
Issues
</th>
<th style={{ width: columnWidths.check }} className="text-left px-3 py-3 text-xs font-semibold text-blue-400 uppercase tracking-wider group cursor-pointer hover:bg-slate-800/50 transition-colors relative" onClick={() => handleSort(COLUMNS.VALIDATED_CHECK)}> <th style={{ width: columnWidths.check }} className="text-left px-3 py-3 text-xs font-semibold text-blue-400 uppercase tracking-wider group cursor-pointer hover:bg-slate-800/50 transition-colors relative" onClick={() => handleSort(COLUMNS.VALIDATED_CHECK)}>
<span className="flex items-center gap-1">Check <SortIcon current={sortConfig.key === COLUMNS.VALIDATED_CHECK ? sortConfig.direction : null} /></span> <span className="flex items-center gap-1">Check <SortIcon current={sortConfig.key === COLUMNS.VALIDATED_CHECK ? sortConfig.direction : null} /></span>
<ResizeHandle onMouseDown={e => { e.stopPropagation(); handleResizeStart(e, 'check', columnWidths.check); }} /> <ResizeHandle onMouseDown={e => { e.stopPropagation(); handleResizeStart(e, 'check', columnWidths.check); }} />
@@ -1240,6 +1244,21 @@ export function PricingView({ data, headers, onSaveRow, onCaptureState, onEdit,
</td> </td>
))} ))}
{/* Issues column */}
<td className="px-3 py-2 overflow-hidden">
{unitErrors.length > 0 ? (
<div className="flex flex-col gap-1">
{unitErrors.map((err, i) => (
<span key={i} className="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold bg-red-500/15 text-red-400 border border-red-500/30 whitespace-nowrap">
<AlertCircle className="w-3 h-3 shrink-0" />{err}
</span>
))}
</div>
) : (
<span className="text-slate-600 text-xs"></span>
)}
</td>
{/* Check Column (Validated + Note) */} {/* Check Column (Validated + Note) */}
<td className="px-3 py-2.5"> <td className="px-3 py-2.5">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">