Files
thrillwiki_laravel/config/universal-listing.php
pacnpal 97a7682eb7 Add Livewire components for parks, rides, and manufacturers
- Implemented ParksLocationSearch component with loading state and refresh functionality.
- Created ParksMapView component with similar structure and functionality.
- Added RegionalParksListing component for displaying regional parks.
- Developed RidesListingUniversal component for universal listing integration.
- Established ManufacturersListing view with navigation and Livewire integration.
- Added feature tests for various Livewire components including OperatorHierarchyView, OperatorParksListing, OperatorPortfolioCard, OperatorsListing, OperatorsRoleFilter, ParksListing, ParksLocationSearch, ParksMapView, and RegionalParksListing to ensure proper rendering and adherence to patterns.
2025-06-23 21:31:05 -04:00

645 lines
25 KiB
PHP

<?php
return [
/*
|--------------------------------------------------------------------------
| Universal Listing Entity Configurations
|--------------------------------------------------------------------------
|
| This file contains the configuration for each entity type that can be
| displayed using the universal listing component. Each entity defines
| its display fields, filters, badges, and other presentation options.
|
*/
'entities' => [
'operators' => [
'title' => 'Operators',
'description' => 'Discover theme park operators, ride manufacturers, and designers',
'searchPlaceholder' => 'Search operators, manufacturers, designers...',
'emptyStateMessage' => 'No operators found',
'emptyStateDescription' => 'Try adjusting your search or filters.',
'viewModes' => ['grid', 'list', 'portfolio'],
'colorScheme' => [
'primary' => 'blue',
'secondary' => 'green',
'accent' => 'purple'
],
'cardFields' => [
'title' => 'name',
'subtitle' => 'location.city_country',
'description' => 'description',
'score' => 'market_influence_score',
'scoreLabel' => 'Market Influence',
'metrics' => [
[
'field' => 'founded_year',
'label' => 'Founded',
'format' => null
],
[
'field' => 'industry_sector',
'label' => 'Sector',
'format' => null
],
[
'field' => 'employee_count',
'label' => 'Employees',
'format' => '%s'
],
[
'field' => 'geographic_presence_level',
'label' => 'Presence',
'format' => null
]
]
],
'badges' => [
'fields' => [
[
'field' => 'parks_count',
'prefix' => 'Operator: ',
'suffix' => ' parks',
'color' => 'blue'
],
[
'field' => 'manufactured_rides_count',
'prefix' => 'Manufacturer: ',
'suffix' => ' rides',
'color' => 'green'
],
[
'field' => 'designed_rides_count',
'prefix' => 'Designer: ',
'suffix' => ' rides',
'color' => 'purple'
]
]
],
'filters' => [
'quickFilters' => [
[
'key' => 'roleFilter',
'value' => 'park_operator',
'label' => 'Operators',
'active' => false,
'count' => null
],
[
'key' => 'roleFilter',
'value' => 'ride_manufacturer',
'label' => 'Manufacturers',
'active' => false,
'count' => null
],
[
'key' => 'roleFilter',
'value' => 'ride_designer',
'label' => 'Designers',
'active' => false,
'count' => null
]
],
'sections' => [
[
'title' => 'Operator Roles',
'type' => 'checkboxes',
'model' => 'roleFilter',
'options' => [
['value' => 'park_operator', 'label' => 'Park Operators', 'count' => null],
['value' => 'ride_manufacturer', 'label' => 'Manufacturers', 'count' => null],
['value' => 'ride_designer', 'label' => 'Designers', 'count' => null]
]
],
[
'title' => 'Company Size',
'type' => 'select',
'model' => 'companySize',
'placeholder' => 'All Sizes',
'options' => [
['value' => 'small', 'label' => 'Small (1-100)'],
['value' => 'medium', 'label' => 'Medium (101-1000)'],
['value' => 'large', 'label' => 'Large (1001-10000)'],
['value' => 'enterprise', 'label' => 'Enterprise (10000+)']
]
],
[
'title' => 'Industry Sector',
'type' => 'select',
'model' => 'industrySector',
'placeholder' => 'All Sectors',
'options' => []
],
[
'title' => 'Founded Year',
'type' => 'range',
'fromModel' => 'foundedYearFrom',
'toModel' => 'foundedYearTo',
'fromLabel' => 'From Year',
'toLabel' => 'To Year',
'fromPlaceholder' => '1900',
'toPlaceholder' => date('Y')
]
]
],
'sortOptions' => [
['value' => 'name', 'label' => 'Name'],
['value' => 'founded_year', 'label' => 'Founded Year'],
['value' => 'parks_count', 'label' => 'Parks Count'],
['value' => 'rides_count', 'label' => 'Rides Count'],
['value' => 'market_influence', 'label' => 'Market Influence']
]
],
'rides' => [
'title' => 'Rides',
'description' => 'Explore thrilling rides from theme parks around the world',
'searchPlaceholder' => 'Search rides, parks, manufacturers...',
'emptyStateMessage' => 'No rides found',
'emptyStateDescription' => 'Try adjusting your search or filters.',
'viewModes' => ['grid', 'list'],
'colorScheme' => [
'primary' => 'red',
'secondary' => 'orange',
'accent' => 'yellow'
],
'cardFields' => [
'title' => 'name',
'subtitle' => 'park.name',
'description' => 'description',
'score' => 'thrill_rating',
'scoreLabel' => 'Thrill Rating',
'metrics' => [
[
'field' => 'opening_year',
'label' => 'Opened',
'format' => null
],
[
'field' => 'category',
'label' => 'Category',
'format' => null
],
[
'field' => 'manufacturer.name',
'label' => 'Manufacturer',
'format' => null
],
[
'field' => 'height_meters',
'label' => 'Height',
'format' => '%sm'
]
]
],
'badges' => [
'fields' => [
[
'field' => 'category',
'prefix' => '',
'suffix' => '',
'color' => 'red'
],
[
'field' => 'status',
'prefix' => '',
'suffix' => '',
'color' => 'green'
]
]
],
'filters' => [
'quickFilters' => [
[
'key' => 'category',
'value' => 'roller_coaster',
'label' => 'Roller Coasters',
'active' => false,
'count' => null
],
[
'key' => 'category',
'value' => 'dark_ride',
'label' => 'Dark Rides',
'active' => false,
'count' => null
],
[
'key' => 'category',
'value' => 'flat_ride',
'label' => 'Flat Rides',
'active' => false,
'count' => null
]
],
'sections' => [
[
'title' => 'Ride Category',
'type' => 'checkboxes',
'model' => 'categories',
'options' => [
['value' => 'roller_coaster', 'label' => 'Roller Coasters', 'count' => null],
['value' => 'dark_ride', 'label' => 'Dark Rides', 'count' => null],
['value' => 'flat_ride', 'label' => 'Flat Rides', 'count' => null],
['value' => 'water_ride', 'label' => 'Water Rides', 'count' => null]
]
],
[
'title' => 'Opening Year',
'type' => 'range',
'fromModel' => 'openingYearFrom',
'toModel' => 'openingYearTo',
'fromLabel' => 'From Year',
'toLabel' => 'To Year',
'fromPlaceholder' => '1900',
'toPlaceholder' => date('Y')
]
]
],
'sortOptions' => [
['value' => 'name', 'label' => 'Name'],
['value' => 'opening_year', 'label' => 'Opening Year'],
['value' => 'thrill_rating', 'label' => 'Thrill Rating'],
['value' => 'height_meters', 'label' => 'Height']
]
],
'parks' => [
'title' => 'Parks',
'description' => 'Discover amazing theme parks from around the world',
'searchPlaceholder' => 'Search parks, locations, operators...',
'emptyStateMessage' => 'No parks found',
'emptyStateDescription' => 'Try adjusting your search or filters.',
'viewModes' => ['grid', 'list', 'portfolio'],
'colorScheme' => [
'primary' => 'green',
'secondary' => 'blue',
'accent' => 'teal'
],
'cardFields' => [
'title' => 'name',
'subtitle' => 'location.city_country',
'description' => 'description',
'score' => 'overall_rating',
'scoreLabel' => 'Rating',
'metrics' => [
[
'field' => 'opening_year',
'label' => 'Opened',
'format' => null
],
[
'field' => 'rides_count',
'label' => 'Rides',
'format' => '%s'
],
[
'field' => 'operator.name',
'label' => 'Operator',
'format' => null
],
[
'field' => 'area_hectares',
'label' => 'Area',
'format' => '%s ha'
]
]
],
'badges' => [
'fields' => [
[
'field' => 'park_type',
'prefix' => '',
'suffix' => '',
'color' => 'green'
],
[
'field' => 'status',
'prefix' => '',
'suffix' => '',
'color' => 'blue'
]
]
],
'filters' => [
'quickFilters' => [
[
'key' => 'parkType',
'value' => 'theme_park',
'label' => 'Theme Parks',
'active' => false,
'count' => null
],
[
'key' => 'parkType',
'value' => 'amusement_park',
'label' => 'Amusement Parks',
'active' => false,
'count' => null
],
[
'key' => 'parkType',
'value' => 'water_park',
'label' => 'Water Parks',
'active' => false,
'count' => null
]
],
'sections' => [
[
'title' => 'Park Type',
'type' => 'checkboxes',
'model' => 'parkTypes',
'options' => [
['value' => 'theme_park', 'label' => 'Theme Parks', 'count' => null],
['value' => 'amusement_park', 'label' => 'Amusement Parks', 'count' => null],
['value' => 'water_park', 'label' => 'Water Parks', 'count' => null],
['value' => 'family_entertainment', 'label' => 'Family Entertainment', 'count' => null]
]
],
[
'title' => 'Opening Year',
'type' => 'range',
'fromModel' => 'openingYearFrom',
'toModel' => 'openingYearTo',
'fromLabel' => 'From Year',
'toLabel' => 'To Year',
'fromPlaceholder' => '1900',
'toPlaceholder' => date('Y')
]
]
],
'sortOptions' => [
['value' => 'name', 'label' => 'Name'],
['value' => 'opening_year', 'label' => 'Opening Year'],
['value' => 'overall_rating', 'label' => 'Rating'],
['value' => 'rides_count', 'label' => 'Rides Count']
]
],
'designers' => [
'title' => 'Designers',
'description' => 'Explore creative minds behind amazing ride experiences',
'searchPlaceholder' => 'Search designers, specialties, projects...',
'emptyStateMessage' => 'No designers found',
'emptyStateDescription' => 'Try adjusting your search or filters.',
'viewModes' => ['grid', 'list', 'portfolio'],
'colorScheme' => [
'primary' => 'purple',
'secondary' => 'pink',
'accent' => 'indigo'
],
'cardFields' => [
'title' => 'name',
'subtitle' => 'location.city_country',
'description' => 'description',
'score' => 'innovation_score',
'scoreLabel' => 'Innovation Score',
'metrics' => [
[
'field' => 'founded_year',
'label' => 'Founded',
'format' => null
],
[
'field' => 'designed_rides_count',
'label' => 'Designs',
'format' => '%s'
],
[
'field' => 'specialty',
'label' => 'Specialty',
'format' => null
],
[
'field' => 'active_years',
'label' => 'Active Years',
'format' => '%s'
]
]
],
'badges' => [
'fields' => [
[
'field' => 'specialty',
'prefix' => '',
'suffix' => '',
'color' => 'purple'
],
[
'field' => 'status',
'prefix' => '',
'suffix' => '',
'color' => 'pink'
]
]
],
'filters' => [
'quickFilters' => [
[
'key' => 'specialty',
'value' => 'roller_coaster',
'label' => 'Coaster Designers',
'active' => false,
'count' => null
],
[
'key' => 'specialty',
'value' => 'dark_ride',
'label' => 'Dark Ride Designers',
'active' => false,
'count' => null
],
[
'key' => 'specialty',
'value' => 'themed_experience',
'label' => 'Experience Designers',
'active' => false,
'count' => null
]
],
'sections' => [
[
'title' => 'Design Specialty',
'type' => 'checkboxes',
'model' => 'specialties',
'options' => [
['value' => 'roller_coaster', 'label' => 'Roller Coasters', 'count' => null],
['value' => 'dark_ride', 'label' => 'Dark Rides', 'count' => null],
['value' => 'themed_experience', 'label' => 'Themed Experiences', 'count' => null],
['value' => 'water_attraction', 'label' => 'Water Attractions', 'count' => null]
]
],
[
'title' => 'Founded Year',
'type' => 'range',
'fromModel' => 'foundedYearFrom',
'toModel' => 'foundedYearTo',
'fromLabel' => 'From Year',
'toLabel' => 'To Year',
'fromPlaceholder' => '1900',
'toPlaceholder' => date('Y')
]
]
],
'sortOptions' => [
['value' => 'name', 'label' => 'Name'],
['value' => 'founded_year', 'label' => 'Founded Year'],
['value' => 'innovation_score', 'label' => 'Innovation Score'],
['value' => 'designed_rides_count', 'label' => 'Designs Count']
]
],
'manufacturers' => [
'title' => 'Manufacturers',
'description' => 'Explore ride manufacturers with product portfolios and industry presence',
'searchPlaceholder' => 'Search manufacturers, products, technologies...',
'emptyStateMessage' => 'No manufacturers found',
'emptyStateDescription' => 'Try adjusting your search or filters.',
'viewModes' => ['grid', 'list', 'portfolio'],
'colorScheme' => [
'primary' => 'orange',
'secondary' => 'amber',
'accent' => 'red'
],
'cardFields' => [
'title' => 'name',
'subtitle' => 'headquarters',
'description' => 'description',
'score' => 'industry_presence_score',
'scoreLabel' => 'Industry Presence',
'metrics' => [
[
'field' => 'total_rides',
'label' => 'Total Rides',
'format' => '%s rides'
],
[
'field' => 'total_roller_coasters',
'label' => 'Roller Coasters',
'format' => '%s coasters'
],
[
'field' => 'founded_year',
'label' => 'Founded',
'format' => null
],
[
'field' => 'market_share',
'label' => 'Market Share',
'format' => '%s%%'
]
]
],
'badges' => [
[
'field' => 'is_active',
'value' => true,
'label' => 'Active',
'color' => 'green'
],
[
'field' => 'specialization',
'value' => 'roller_coasters',
'label' => 'Coaster Specialist',
'color' => 'red'
],
[
'field' => 'specialization',
'value' => 'family_rides',
'label' => 'Family Rides',
'color' => 'blue'
],
[
'field' => 'specialization',
'value' => 'thrill_rides',
'label' => 'Thrill Rides',
'color' => 'purple'
],
[
'field' => 'innovation_leader',
'value' => true,
'label' => 'Innovation Leader',
'color' => 'yellow'
]
],
'filters' => [
[
'type' => 'select',
'field' => 'specialization',
'label' => 'Specialization',
'options' => [
'roller_coasters' => 'Roller Coasters',
'family_rides' => 'Family Rides',
'thrill_rides' => 'Thrill Rides',
'water_rides' => 'Water Rides',
'dark_rides' => 'Dark Rides',
'transportation' => 'Transportation'
]
],
[
'type' => 'range',
'field' => 'total_rides',
'label' => 'Total Rides',
'min' => 0,
'max' => 1000,
'step' => 10
],
[
'type' => 'range',
'field' => 'industry_presence_score',
'label' => 'Industry Presence Score',
'min' => 0,
'max' => 100,
'step' => 5
],
[
'type' => 'range',
'field' => 'founded_year',
'label' => 'Founded Year',
'min' => 1800,
'max' => 2025,
'step' => 5
],
[
'type' => 'checkbox',
'field' => 'is_active',
'label' => 'Active Manufacturers'
],
[
'type' => 'checkbox',
'field' => 'innovation_leader',
'label' => 'Innovation Leaders'
]
],
'statistics' => [
[
'label' => 'Total Manufacturers',
'field' => 'count',
'format' => '%s manufacturers'
],
[
'label' => 'Active Manufacturers',
'field' => 'active_count',
'format' => '%s active'
],
[
'label' => 'Total Rides Manufactured',
'field' => 'total_rides_sum',
'format' => '%s rides'
],
[
'label' => 'Average Industry Presence',
'field' => 'avg_industry_presence',
'format' => '%.1f/100'
]
],
'customSlots' => [
'header' => 'manufacturers-header',
'filters' => 'manufacturers-filters',
'statistics' => 'manufacturers-statistics',
'emptyState' => 'manufacturers-empty'
]
]
]
];