feat(food): implement FoodController, FoodService, and related resources for managing food items and variants
refactor(catalog): add description and price fields to variants and update related resources feat(migration): add commercial overrides to variants with description and price fields test(food): add tests for FoodController and ensure correct seeding of food items and variants
This commit is contained in:
@@ -165,6 +165,8 @@ class CatalogItemDetailResource extends JsonResource
|
||||
'event_date' => $variant->eventDate?->date?->format('Y-m-d'),
|
||||
'event_date_ids' => $eventDates->pluck('id')->values(),
|
||||
'event_dates' => $eventDates->map(fn ($eventDate): string => $eventDate->date->format('Y-m-d'))->values(),
|
||||
'descripcion' => $variant->getDescription(),
|
||||
'precio' => number_format($variant->getPrice(), 2, '.', ''),
|
||||
'stock_tecnico' => $this->variantStock($variant),
|
||||
'values' => $values,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user