mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 14:35:23 +02:00
feat: always show undo button in DimensionsView
This commit is contained in:
@@ -664,28 +664,26 @@ export function DimensionsView({ data, headers, onEdit, onSaveRow, onCaptureStat
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-4 py-3 text-right">
|
<td className="px-4 py-3 text-right">
|
||||||
<div className="flex items-center justify-end gap-1 opacity-0 group-hover:opacity-100 transition-opacity">
|
<div className="flex items-center justify-end gap-1">
|
||||||
<button
|
<button
|
||||||
onClick={() => handleFullSync(group, row)}
|
onClick={() => handleFullSync(group, row)}
|
||||||
title="FULL SYNC: Apply ALL packaging measures labels to all in group"
|
title="FULL SYNC: Apply ALL packaging measures labels to all in group"
|
||||||
disabled={syncing?.key === group.key}
|
disabled={syncing?.key === group.key}
|
||||||
className="p-1.5 hover:bg-blue-600/20 text-slate-500 hover:text-blue-400 rounded transition-all"
|
className="p-1.5 hover:bg-blue-600/20 text-slate-500 hover:text-blue-400 rounded transition-all opacity-0 group-hover:opacity-100"
|
||||||
>
|
>
|
||||||
{syncing?.key === group.key && syncing?.field === 'all' ? <Loader2 className="w-4 h-4 animate-spin" /> : <RefreshCw className="w-4 h-4" />}
|
{syncing?.key === group.key && syncing?.field === 'all' ? <Loader2 className="w-4 h-4 animate-spin" /> : <RefreshCw className="w-4 h-4" />}
|
||||||
</button>
|
</button>
|
||||||
{isPending && (
|
<button
|
||||||
<button
|
onClick={() => onRevertRow(String(row[COLUMNS.ARTICLE_NO]))}
|
||||||
onClick={() => onRevertRow(String(row[COLUMNS.ARTICLE_NO]))}
|
title="Undo pending changes"
|
||||||
title="Undo pending changes"
|
className="p-1.5 hover:bg-red-600/20 text-yellow-500 hover:text-red-400 rounded transition-all"
|
||||||
className="p-1.5 hover:bg-red-600/20 text-slate-500 hover:text-red-400 rounded transition-all"
|
>
|
||||||
>
|
<Undo2 className="w-4 h-4" />
|
||||||
<Undo2 className="w-4 h-4" />
|
</button>
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
<button
|
<button
|
||||||
onClick={() => onEdit(index)}
|
onClick={() => onEdit(index)}
|
||||||
title="Edit product"
|
title="Edit product"
|
||||||
className="p-1.5 hover:bg-slate-600/20 text-slate-500 hover:text-slate-300 rounded transition-all"
|
className="p-1.5 hover:bg-slate-600/20 text-slate-500 hover:text-slate-300 rounded transition-all opacity-0 group-hover:opacity-100"
|
||||||
>
|
>
|
||||||
<Edit2 className="w-4 h-4" />
|
<Edit2 className="w-4 h-4" />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user