feat: remove EventProductType references and related logic from catalog and fiesta futbol infantil components

This commit is contained in:
2026-08-10 16:37:28 -03:00
parent 5bfc8b9f70
commit 69320c54d4
21 changed files with 90 additions and 79 deletions

View File

@@ -5,7 +5,6 @@ namespace App\Domains\Catalog\Services;
use App\Domains\Attachable\Models\Attachment;
use App\Domains\Attachable\Services\AttachmentService;
use App\Domains\Catalog\Enums\CatalogItemType;
use App\Domains\Catalog\Enums\EventProductType;
use App\Domains\Catalog\Models\Attribute;
use App\Domains\Catalog\Models\CatalogItem;
use App\Domains\Catalog\Models\Category;
@@ -65,7 +64,6 @@ class CatalogService
]);
}
$this->validateEventProductType($data);
$this->validateUniqueVariantCombinations($variants, $attributeCodes);
if ($type === CatalogItemType::Bundle) {
@@ -622,22 +620,6 @@ class CatalogService
return $variant;
}
/** @param array<string, mixed> $data */
private function validateEventProductType(array $data): void
{
$eventProductType = $data['event_product_type'] ?? null;
if ($eventProductType === null) {
return;
}
if (! in_array($eventProductType, EventProductType::values(), true)) {
throw ValidationException::withMessages([
'event_product_type' => [__('api.catalog.invalid_event_product_type')],
]);
}
}
/**
* @param array<int, array<string, mixed>> $variants
* @param array<int, string> $attributeCodes