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

@@ -771,7 +771,7 @@
[description]="testTicketSelectorProduct.description"
[price]="testTicketSelectorProduct.price"
[imageUrl]="testTicketSelectorProduct.imageUrl"
[variants]="testTicketSelectorVariants"
[variants]="testTicketSelectorProduct.variants"
(buy)="onTicketBuy($event)"
/>
</div>

View File

@@ -211,9 +211,9 @@ export class ReutilizablesTestPageComponent {
'Acceso total al predio. No incluye acceso a estacionamiento. Niños menores de 5 años ingresan gratis.',
price: 10000,
variants: [
{ value: '10-oct-manana', values: { fecha: '10 de Octubre', turno: 'Mañana' } },
{ value: '10-oct-tarde', values: { fecha: '10 de Octubre', turno: 'Tarde' } },
{ value: '11-oct-tarde', values: { fecha: '11 de Octubre', turno: 'Tarde' } },
{ id: '10-oct-manana', values: { fecha: '10 de Octubre', turno: 'Mañana' } },
{ id: '10-oct-tarde', values: { fecha: '10 de Octubre', turno: 'Tarde' } },
{ id: '11-oct-tarde', values: { fecha: '11 de Octubre', turno: 'Tarde' } },
],
};
@@ -342,15 +342,6 @@ export class ReutilizablesTestPageComponent {
],
};
protected readonly testTicketSelectorVariants = this.testTicketSelectorProduct.variants.map(
(variant) => ({
value: variant.id,
precio: variant.precio,
stock_tecnico: variant.stock_tecnico,
values: variant.values,
}),
);
protected readonly cartMockItems: CartItemMock[] = [
{
imageUrl: null,