Revert "feat: enhance variant attribute handling across components for improved selection and display"
This reverts commit 56f602d876.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user