feat(F-122): completed feature

This commit is contained in:
chattie
2026-08-21 15:32:24 +02:00
parent b9610bf546
commit a5538fc8f0
9 changed files with 102 additions and 38 deletions

View File

@@ -27,7 +27,6 @@ type VatRate = 'general' | 'reduced' | 'super-reduced';
export function PriceStockSection({ productId }: { productId: string }) {
const [variant, setVariant] = useState<ProductVariant | null>(null);
const [loadError, setLoadError] = useState('');
const [extraVariants, setExtraVariants] = useState(0);
// Precio
const [gross, setGross] = useState('');
@@ -75,7 +74,6 @@ export function PriceStockSection({ productId }: { productId: string }) {
if (cancelled) return;
const first = items?.[0] ?? null;
setVariant(first);
setExtraVariants(Math.max(0, (items?.length ?? 0) - 1));
setEan(first?.ean ?? '');
if (!first) return;
// Precio vigente
@@ -369,12 +367,6 @@ export function PriceStockSection({ productId }: { productId: string }) {
</p>
</div>
</div>
{extraVariants > 0 && (
<p className="text-xs text-amber-600">
Este producto tiene {extraVariants} variante(s) heredada(s). Se está editando la principal.
</p>
)}
</div>
);
}

File diff suppressed because one or more lines are too long