refactor(variants): standardize variant structure and improve variant handling across components

This commit is contained in:
2026-08-12 10:47:09 -03:00
parent e4157a4005
commit 1bbb3d0914
16 changed files with 59 additions and 81 deletions

View File

@@ -37,7 +37,7 @@ export class ProductRowCardComponent {
readonly addToCart = output<{ quantity: number; variant: unknown }>();
protected readonly selectedVariantData = computed(() =>
this.variants().find((variant) => Object.is(variant.value, this.selectedVariant())),
this.variants().find((variant) => Object.is(variant.id, this.selectedVariant())),
);
protected readonly effectiveDescription = computed(
() => this.selectedVariantData()?.descripcion ?? this.description(),