Revert "feat: enhance variant attribute handling across components for improved selection and display"

This reverts commit 56f602d876.
This commit is contained in:
2026-08-10 16:17:09 -03:00
parent c645feba80
commit 0769bb8683
9 changed files with 35 additions and 191 deletions

View File

@@ -14,7 +14,6 @@ import {
InventoryPolicy,
ProductAttribute,
ProductAttributeOption,
VariantAttributeValue,
} from '../../../../core/services/catalog/catalog.interface';
@Component({
@@ -199,7 +198,7 @@ export class ProductAttributeSelectorComponent {
private getVariantAttributeValues(
attribute: ProductAttribute,
variantAttributes: Record<string, VariantAttributeValue>,
variantAttributes: Record<string, string | string[]>,
): string[] {
const normalizedCodigo = this.normalizeText(attribute.codigo);
const normalizedNombre = this.normalizeText(attribute.nombre);
@@ -208,9 +207,7 @@ export class ProductAttributeSelectorComponent {
const normalizedKey = this.normalizeText(key);
if (normalizedKey === normalizedCodigo || normalizedKey === normalizedNombre) {
return (Array.isArray(value) ? value : [value]).map((item) =>
this.normalizeText(typeof item === 'string' ? item : item.value),
);
return (Array.isArray(value) ? value : [value]).map((item) => this.normalizeText(item));
}
}