feat: remove EventProductType references and related logic from catalog and fiesta futbol infantil components
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Domains\FiestaFutbolInfantil\Services;
|
||||
|
||||
use App\Domains\Catalog\Enums\EventProductType;
|
||||
use App\Domains\Catalog\Enums\InventoryPolicy;
|
||||
use App\Domains\Catalog\Models\Attribute;
|
||||
use App\Domains\Catalog\Models\AttributeOption;
|
||||
@@ -29,7 +28,6 @@ class MerchandiseService
|
||||
{
|
||||
return CatalogItem::query()
|
||||
->where('tenant_code', $tenant->codigo)
|
||||
->where('event_product_type', EventProductType::Product->value)
|
||||
->whereHas('category', fn ($query) => $query->where('nombre', 'Merchandising'))
|
||||
->with([
|
||||
'itemAttributes.attribute.options',
|
||||
@@ -74,7 +72,6 @@ class MerchandiseService
|
||||
'descripcion' => $data['description'] ?? null,
|
||||
'category_id' => $category->id,
|
||||
'max_units_per_user' => (int) $data['max_units_per_user'],
|
||||
'event_product_type' => EventProductType::Product->value,
|
||||
'inventory_policy' => InventoryPolicy::Tracked->value,
|
||||
'has_tickets' => true,
|
||||
]);
|
||||
@@ -129,7 +126,6 @@ class MerchandiseService
|
||||
->whereKey($merchandiseId)
|
||||
->whereHas('catalogItem', fn ($query) => $query
|
||||
->where('tenant_code', $tenant->codigo)
|
||||
->where('event_product_type', EventProductType::Product->value)
|
||||
->whereHas('category', fn ($categoryQuery) => $categoryQuery
|
||||
->where('nombre', 'Merchandising')))
|
||||
->firstOrFail();
|
||||
@@ -170,7 +166,6 @@ class MerchandiseService
|
||||
->whereKey($itemId)
|
||||
->where('tenant_code', $tenant->codigo)
|
||||
->where('category_id', $category->id)
|
||||
->where('event_product_type', EventProductType::Product->value)
|
||||
->lockForUpdate()
|
||||
->first();
|
||||
|
||||
@@ -201,7 +196,6 @@ class MerchandiseService
|
||||
'category_id' => $category->id,
|
||||
'precio' => collect($data['variants'])->min('price') ?? 0,
|
||||
'max_units_per_user' => (int) $data['max_units_per_user'],
|
||||
'event_product_type' => EventProductType::Product->value,
|
||||
'inventory_policy' => InventoryPolicy::Tracked->value,
|
||||
'has_tickets' => true,
|
||||
'inventory_id' => null,
|
||||
|
||||
Reference in New Issue
Block a user