refactor(website): add 'dates_text' field to event configuration and update related tests
This commit is contained in:
@@ -51,7 +51,7 @@
|
|||||||
],
|
],
|
||||||
"body": {
|
"body": {
|
||||||
"mode": "raw",
|
"mode": "raw",
|
||||||
"raw": "{\n \"codigo\": \"festival-demo\",\n \"nombre\": \"Festival Demo\",\n \"dominio\": \"festival-demo.test\",\n \"primary_color\": \"#111111\",\n \"secondary_color\": \"#222222\",\n \"danger_color\": \"#ff0000\",\n \"success_color\": \"#00aa55\",\n \"header_bg_color\": \"#333333\",\n \"footer_bg_color\": \"#333333\",\n \"header_logo\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\",\n \"footer_logo\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\",\n \"search_product_layout\": \"column_with_image\",\n \"search_group_layout\": \"paginated\",\n \"search_items_per_page\": 12,\n \"website_type_code\": \"onticket\",\n \"extras\": {\n \"heroConfig\": {\n \"title_html\": \"<h1>Festival Demo</h1>\",\n \"description_html\": \"<p>Una experiencia inolvidable</p>\",\n \"button_text\": \"Comprar entradas\",\n \"button_href\": \"/tickets\",\n \"background_image_id\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\"\n },\n \"eventConfig\": {\n \"title\": \"Festival Demo\",\n \"location\": \"Buenos Aires\",\n \"dates\": [\n \"2026-10-10\",\n \"2026-10-11\"\n ]\n }\n }\n}"
|
"raw": "{\n \"codigo\": \"festival-demo\",\n \"nombre\": \"Festival Demo\",\n \"dominio\": \"festival-demo.test\",\n \"primary_color\": \"#111111\",\n \"secondary_color\": \"#222222\",\n \"danger_color\": \"#ff0000\",\n \"success_color\": \"#00aa55\",\n \"header_bg_color\": \"#333333\",\n \"footer_bg_color\": \"#333333\",\n \"header_logo\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\",\n \"footer_logo\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\",\n \"search_product_layout\": \"column_with_image\",\n \"search_group_layout\": \"paginated\",\n \"search_items_per_page\": 12,\n \"website_type_code\": \"onticket\",\n \"extras\": {\n \"heroConfig\": {\n \"title_html\": \"<h1>Festival Demo</h1>\",\n \"description_html\": \"<p>Una experiencia inolvidable</p>\",\n \"button_text\": \"Comprar entradas\",\n \"button_href\": \"/tickets\",\n \"background_image_id\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\"\n },\n \"eventConfig\": {\n \"title\": \"Festival Demo\",\n \"location\": \"Buenos Aires\",\n \"dates_text\": \"10 y 11 de octubre de 2026\",\n \"dates\": [\n \"2026-10-10\",\n \"2026-10-11\"\n ]\n }\n }\n}"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{base_url}}/api/tenants",
|
"raw": "{{base_url}}/api/tenants",
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ class TenantSeeder extends Seeder
|
|||||||
'eventConfig' => [
|
'eventConfig' => [
|
||||||
'title' => 'Fiesta Fútbol Infantil',
|
'title' => 'Fiesta Fútbol Infantil',
|
||||||
'location' => 'Rosario, Santa Fe',
|
'location' => 'Rosario, Santa Fe',
|
||||||
|
'dates_text' => '9, 10, 11 y 12 de Octubre 2026',
|
||||||
'dates' => [
|
'dates' => [
|
||||||
'2026-12-05',
|
'2026-12-05',
|
||||||
'2026-12-06',
|
'2026-12-06',
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ class WebsiteTypeSeeder extends Seeder
|
|||||||
'$' => 'required|array',
|
'$' => 'required|array',
|
||||||
'title' => 'nullable|string',
|
'title' => 'nullable|string',
|
||||||
'location' => 'nullable|string',
|
'location' => 'nullable|string',
|
||||||
|
'dates_text' => 'nullable|string|max:255',
|
||||||
'dates' => 'nullable|array',
|
'dates' => 'nullable|array',
|
||||||
'dates.*' => 'required|date_format:Y-m-d|distinct',
|
'dates.*' => 'required|date_format:Y-m-d|distinct',
|
||||||
],
|
],
|
||||||
@@ -93,6 +94,7 @@ class WebsiteTypeSeeder extends Seeder
|
|||||||
'$' => 'required|array',
|
'$' => 'required|array',
|
||||||
'title' => 'nullable|string',
|
'title' => 'nullable|string',
|
||||||
'location' => 'nullable|string',
|
'location' => 'nullable|string',
|
||||||
|
'dates_text' => 'nullable|string|max:255',
|
||||||
'dates' => 'nullable|array',
|
'dates' => 'nullable|array',
|
||||||
'dates.*' => 'required|date_format:Y-m-d|distinct',
|
'dates.*' => 'required|date_format:Y-m-d|distinct',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ class TenantSeederTest extends TestCase
|
|||||||
$this->assertSame([
|
$this->assertSame([
|
||||||
'title' => 'Fiesta Fútbol Infantil',
|
'title' => 'Fiesta Fútbol Infantil',
|
||||||
'location' => 'Rosario, Santa Fe',
|
'location' => 'Rosario, Santa Fe',
|
||||||
|
'dates_text' => '9, 10, 11 y 12 de Octubre 2026',
|
||||||
'dates' => [
|
'dates' => [
|
||||||
'2026-12-05',
|
'2026-12-05',
|
||||||
'2026-12-06',
|
'2026-12-06',
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ class WebsiteTypeSeederTest extends TestCase
|
|||||||
'$' => 'required|array',
|
'$' => 'required|array',
|
||||||
'title' => 'nullable|string',
|
'title' => 'nullable|string',
|
||||||
'location' => 'nullable|string',
|
'location' => 'nullable|string',
|
||||||
|
'dates_text' => 'nullable|string|max:255',
|
||||||
'dates' => 'nullable|array',
|
'dates' => 'nullable|array',
|
||||||
'dates.*' => 'required|date_format:Y-m-d|distinct',
|
'dates.*' => 'required|date_format:Y-m-d|distinct',
|
||||||
],
|
],
|
||||||
@@ -93,6 +94,7 @@ class WebsiteTypeSeederTest extends TestCase
|
|||||||
'$' => 'required|array',
|
'$' => 'required|array',
|
||||||
'title' => 'nullable|string',
|
'title' => 'nullable|string',
|
||||||
'location' => 'nullable|string',
|
'location' => 'nullable|string',
|
||||||
|
'dates_text' => 'nullable|string|max:255',
|
||||||
'dates' => 'nullable|array',
|
'dates' => 'nullable|array',
|
||||||
'dates.*' => 'required|date_format:Y-m-d|distinct',
|
'dates.*' => 'required|date_format:Y-m-d|distinct',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class StoreTenantWithExtrasTest extends TestCase
|
|||||||
'eventConfig' => [
|
'eventConfig' => [
|
||||||
'title' => 'Festival',
|
'title' => 'Festival',
|
||||||
'location' => 'Buenos Aires',
|
'location' => 'Buenos Aires',
|
||||||
|
'dates_text' => '10 y 11 de octubre de 2026',
|
||||||
'dates' => ['2026-10-10', '2026-10-11'],
|
'dates' => ['2026-10-10', '2026-10-11'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -50,6 +51,7 @@ class StoreTenantWithExtrasTest extends TestCase
|
|||||||
[
|
[
|
||||||
'title' => 'Festival',
|
'title' => 'Festival',
|
||||||
'location' => 'Buenos Aires',
|
'location' => 'Buenos Aires',
|
||||||
|
'dates_text' => '10 y 11 de octubre de 2026',
|
||||||
'dates' => ['2026-10-10', '2026-10-11'],
|
'dates' => ['2026-10-10', '2026-10-11'],
|
||||||
],
|
],
|
||||||
$tenant->websiteExtras()->sole()->config
|
$tenant->websiteExtras()->sole()->config
|
||||||
|
|||||||
Reference in New Issue
Block a user