feat(tenant): enhance storefront website types with header_type and multi-event support

This commit is contained in:
2026-09-17 16:02:21 -03:00
parent 131eb1a7ee
commit eb1e4df63f
8 changed files with 50 additions and 7 deletions

View File

@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('storefront_website_types', function (Blueprint $table): void {
$table->string('header_type')->default('standard');
});
}
public function down(): void
{
Schema::table('storefront_website_types', function (Blueprint $table): void {
$table->dropColumn('header_type');
});
}
};

View File

@@ -76,7 +76,7 @@ class TenantSeeder extends Seeder
'display_categories' => false,
'display_seach_bar' => false,
'admin_website_type_code' => $onTicketType->codigo,
'storefront_website_type_code' => $onTicketType->codigo,
'storefront_website_type_code' => 'onticket_multi_event',
'header_logo' => $this->uploadedImage(
'images/tennants/onticket/onticket_logo.png',
'onticket_logo.png',
@@ -103,6 +103,10 @@ class TenantSeeder extends Seeder
]);
}
if ($onTicketTenant !== null && $onTicketTenant->storefront_website_type_code === 'onticket') {
$onTicketTenant->update(['storefront_website_type_code' => 'onticket_multi_event']);
}
$this->deleteTenant('sonder');
Tenant::query()

View File

@@ -41,7 +41,10 @@ class WebsiteTypeSeeder extends Seeder
],
);
$shopItStorefront = StorefrontWebsiteType::query()->updateOrCreate(['codigo' => 'shopit'], ['nombre' => 'ShopIt']);
$shopItStorefront = StorefrontWebsiteType::query()->updateOrCreate(
['codigo' => 'shopit'],
['nombre' => 'ShopIt', 'header_type' => 'standard'],
);
$shopItStorefront->extras()->updateOrCreate(
['codigo' => 'carousel'],
@@ -78,7 +81,15 @@ class WebsiteTypeSeeder extends Seeder
],
);
$onTicketStorefront = StorefrontWebsiteType::query()->updateOrCreate(['codigo' => 'onticket'], ['nombre' => 'OnTicket']);
$onTicketStorefront = StorefrontWebsiteType::query()->updateOrCreate(
['codigo' => 'onticket'],
['nombre' => 'OnTicket - evento único', 'header_type' => 'standard'],
);
StorefrontWebsiteType::query()->updateOrCreate(
['codigo' => 'onticket_multi_event'],
['nombre' => 'OnTicket - múltiples eventos', 'header_type' => 'immersive'],
);
$onTicketStorefront->extras()->updateOrCreate(
['codigo' => 'heroConfig'],