feat(F-122): completed feature
This commit is contained in:
@@ -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
Reference in New Issue
Block a user