refactor(variants): standardize variant structure and improve variant handling across components
This commit is contained in:
@@ -771,7 +771,7 @@
|
||||
[description]="testTicketSelectorProduct.description"
|
||||
[price]="testTicketSelectorProduct.price"
|
||||
[imageUrl]="testTicketSelectorProduct.imageUrl"
|
||||
[variants]="testTicketSelectorVariants"
|
||||
[variants]="testTicketSelectorProduct.variants"
|
||||
(buy)="onTicketBuy($event)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user