diff --git a/frontend/app/admin/products/MergePreviewForm.tsx b/frontend/app/admin/products/MergePreviewForm.tsx
index 50cc5cc6..572038b1 100644
--- a/frontend/app/admin/products/MergePreviewForm.tsx
+++ b/frontend/app/admin/products/MergePreviewForm.tsx
@@ -129,214 +129,216 @@ export default function MergePreviewForm({ products }: Props) {
{isExpanded && (
-
- Source product (ska bort)
- setSourceProductId(e.target.value)}
- style={{
- width: '100%',
- padding: '0.75rem',
- border: '1px solid #ddd',
- borderRadius: '4px',
- fontSize: '1rem',
- boxSizing: 'border-box',
- minHeight: '44px',
- }}
- >
- Välj source
- {products.map((product) => (
-
- {product.canonicalName || product.name} (ID {product.id})
-
- ))}
-
-
+
+ Source product (ska bort)
+ setSourceProductId(e.target.value)}
+ style={{
+ width: '100%',
+ padding: '0.75rem',
+ border: '1px solid #ddd',
+ borderRadius: '4px',
+ fontSize: '1rem',
+ boxSizing: 'border-box',
+ minHeight: '44px',
+ }}
+ >
+ Välj source
+ {products.map((product) => (
+
+ {product.canonicalName || product.name} (ID {product.id})
+
+ ))}
+
+
-
- Target product (ska behållas)
- setTargetProductId(e.target.value)}
- style={{
- width: '100%',
- padding: '0.75rem',
- border: '1px solid #ddd',
- borderRadius: '4px',
- fontSize: '1rem',
- boxSizing: 'border-box',
- minHeight: '44px',
- }}
- >
- Välj target
- {products.map((product) => (
-
- {product.canonicalName || product.name} (ID {product.id})
-
- ))}
-
-
-
-
-
-
- {isPending ? 'Hämtar preview...' : 'Förhandsgranska merge'}
-
-
- {preview ? (
- setIsConfirming((prev) => !prev)}
- disabled={isPending}
- style={{
- padding: '0.75rem 1.5rem',
- background: '#f0f0f0',
- color: '#333',
- border: '1px solid #ccc',
- borderRadius: '4px',
- cursor: 'pointer',
- fontSize: '1rem',
- minHeight: '44px',
- fontWeight: 600,
- }}
- >
- {isConfirming ? 'Avbryt bekräftelse' : 'Gå vidare till bekräftelse'}
-
- ) : null}
-
-
- {error ?
{error}
: null}
- {successMessage ?
{successMessage}
: null}
-
- {preview ? (
-
-
-
- Source
- ID: {preview.source.id}
- Namn: {preview.source.name}
- Canonical: {preview.source.canonicalName || 'Saknas'}
- Normalized: {preview.source.normalizedName}
- Aktiv: {preview.source.isActive ? 'Ja' : 'Nej'}
- Inventory count: {preview.source.inventoryCount}
-
-
-
- Target
- ID: {preview.target.id}
- Namn: {preview.target.name}
- Canonical: {preview.target.canonicalName || 'Saknas'}
- Normalized: {preview.target.normalizedName}
- Aktiv: {preview.target.isActive ? 'Ja' : 'Nej'}
- Inventory count: {preview.target.inventoryCount}
-
+
+ Target product (ska behållas)
+ setTargetProductId(e.target.value)}
+ style={{
+ width: '100%',
+ padding: '0.75rem',
+ border: '1px solid #ddd',
+ borderRadius: '4px',
+ fontSize: '1rem',
+ boxSizing: 'border-box',
+ minHeight: '44px',
+ }}
+ >
+ Välj target
+ {products.map((product) => (
+
+ {product.canonicalName || product.name} (ID {product.id})
+
+ ))}
+
+
-
- Det här kommer att hända
-
- Inventory som flyttas: {preview.outcome.inventoryItemsToMove}
-
-
- Source soft-deletas: {' '}
- {preview.outcome.sourceWillBeSoftDeleted ? 'Ja' : 'Nej'}
-
-
- Target förblir aktiv: {' '}
- {preview.outcome.targetWillRemainActive ? 'Ja' : 'Nej'}
-
-
-
- {isConfirming ? (
-
+
- Bekräfta merge
-
- Du är på väg att slå ihop{' '}
- {preview.source.canonicalName || preview.source.name} in i{' '}
- {preview.target.canonicalName || preview.target.name} .
-
-
- Source-produkten kommer att soft-deletas och kan återställas senare, men
- inventory flyttas till target.
-
+ {isPending ? 'Hämtar preview...' : 'Förhandsgranska merge'}
+
-
-
- {isPending ? 'Slår ihop...' : 'Bekräfta merge'}
-
+ {preview ? (
+ setIsConfirming((prev) => !prev)}
+ disabled={isPending}
+ style={{
+ padding: '0.75rem 1.5rem',
+ background: '#f0f0f0',
+ color: '#333',
+ border: '1px solid #ccc',
+ borderRadius: '4px',
+ cursor: 'pointer',
+ fontSize: '1rem',
+ minHeight: '44px',
+ fontWeight: 600,
+ }}
+ >
+ {isConfirming ? 'Avbryt bekräftelse' : 'Gå vidare till bekräftelse'}
+
+ ) : null}
+
- setIsConfirming(false)}
- disabled={isPending}
- style={{
- padding: '0.75rem 1.5rem',
- background: '#f0f0f0',
- color: '#333',
- border: '1px solid #ccc',
- borderRadius: '4px',
- cursor: 'pointer',
- fontSize: '1rem',
- minHeight: '44px',
- fontWeight: 600,
- }}
- >
- Avbryt
-
+ {error ? {error}
: null}
+ {successMessage ? {successMessage}
: null}
+
+ {preview ? (
+
+
+
+ Source
+ ID: {preview.source.id}
+ Namn: {preview.source.name}
+ Canonical: {preview.source.canonicalName || 'Saknas'}
+ Normalized: {preview.source.normalizedName}
+ Aktiv: {preview.source.isActive ? 'Ja' : 'Nej'}
+ Inventory count: {preview.source.inventoryCount}
+
+
+
+ Target
+ ID: {preview.target.id}
+ Namn: {preview.target.name}
+ Canonical: {preview.target.canonicalName || 'Saknas'}
+ Normalized: {preview.target.normalizedName}
+ Aktiv: {preview.target.isActive ? 'Ja' : 'Nej'}
+ Inventory count: {preview.target.inventoryCount}
+
-
+
+
+ Det här kommer att hända
+
+ Inventory som flyttas: {preview.outcome.inventoryItemsToMove}
+
+
+ Source soft-deletas: {' '}
+ {preview.outcome.sourceWillBeSoftDeleted ? 'Ja' : 'Nej'}
+
+
+ Target förblir aktiv: {' '}
+ {preview.outcome.targetWillRemainActive ? 'Ja' : 'Nej'}
+
+
+
+ {isConfirming ? (
+
+ Bekräfta merge
+
+ Du är på väg att slå ihop{' '}
+ {preview.source.canonicalName || preview.source.name} in i{' '}
+ {preview.target.canonicalName || preview.target.name} .
+
+
+ Source-produkten kommer att soft-deletas och kan återställas senare, men
+ inventory flyttas till target.
+
+
+
+
+ {isPending ? 'Slår ihop...' : 'Bekräfta merge'}
+
+
+ setIsConfirming(false)}
+ disabled={isPending}
+ style={{
+ padding: '0.75rem 1.5rem',
+ background: '#f0f0f0',
+ color: '#333',
+ border: '1px solid #ccc',
+ borderRadius: '4px',
+ cursor: 'pointer',
+ fontSize: '1rem',
+ minHeight: '44px',
+ fontWeight: 600,
+ }}
+ >
+ Avbryt
+
+
+
+ ) : null}
+
) : null}
)}