feat(website-extras): enhance toggle functionality and update related tests; add additional info configuration to tenant extras

This commit is contained in:
2026-08-03 09:10:50 -03:00
parent f1df6a5918
commit 4a51f3afde
10 changed files with 134 additions and 17 deletions

View File

@@ -120,7 +120,6 @@ class TenantSeeder extends Seeder
'extras' => [
'heroConfig' => [
'title_html' => '<h1>Fiesta Fútbol Infantil</h1>',
'description_html' => '<p>Viví una jornada inolvidable de fútbol infantil.</p>',
'button_text' => 'Comprar entradas',
'button_href' => '/tickets',
'background_image_id' => $this->uploadedImage(
@@ -133,10 +132,21 @@ class TenantSeeder extends Seeder
'location' => 'Rosario, Santa Fe',
'dates_text' => '9, 10, 11 y 12 de Octubre 2026',
'dates' => [
'2026-12-05',
'2026-12-06',
[
'date' => '2026-12-05',
'start_time' => '09:00',
'end_time' => '18:00',
],
[
'date' => '2026-12-06',
'start_time' => '09:00',
'end_time' => '18:00',
],
],
],
'additionalInfoConfig' => [
'description' => '<p>Viví una jornada inolvidable de fútbol infantil.</p>',
],
],
]);
}

View File

@@ -107,7 +107,30 @@ class WebsiteTypeSeeder extends Seeder
'location' => 'nullable|string',
'dates_text' => 'nullable|string|max:255',
'dates' => 'nullable|array',
'dates.*' => 'required|date_format:Y-m-d|distinct',
'dates.*' => 'required|array:date,start_time,end_time',
'dates.*.date' => 'required|date_format:Y-m-d|distinct',
'dates.*.start_time' => 'required|date_format:H:i',
'dates.*.end_time' => 'required|date_format:H:i',
'contact' => 'nullable|array:whatsapp_url,instagram_url,facebook_url',
'contact.whatsapp_url' => 'nullable|url|max:2048',
'contact.instagram_url' => 'nullable|url|max:2048',
'contact.facebook_url' => 'nullable|url|max:2048',
],
'transforms' => [],
],
],
);
$onTicket->extras()->updateOrCreate(
['codigo' => 'additionalInfoConfig'],
[
'nombre' => 'Información adicional',
'descripcion' => 'Información adicional visible en la página del evento.',
'is_required' => false,
'config_schema' => [
'request_rules' => [
'$' => 'required|array',
'description' => 'nullable|string',
],
'transforms' => [],
],