mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-29 11:47:06 -05:00
Compare commits
4 Commits
99acc31e3c
...
ef312618f5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef312618f5 | ||
|
|
703dbcd8af | ||
|
|
890a6ab911 | ||
|
|
72599bf62f |
@@ -85,7 +85,7 @@ export function DesignerFilters({ filters, onFiltersChange, designers }: Designe
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FilterSection title="Basic Filters">
|
<FilterSection title="Basic Filters">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label>Entity Type</Label>
|
<Label>Entity Type</Label>
|
||||||
<Select
|
<Select
|
||||||
@@ -126,7 +126,7 @@ export function DesignerFilters({ filters, onFiltersChange, designers }: Designe
|
|||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
<FilterSection title="Statistics">
|
<FilterSection title="Statistics">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterRangeSlider
|
<FilterRangeSlider
|
||||||
label="Rating"
|
label="Rating"
|
||||||
value={[filters.minRating, filters.maxRating]}
|
value={[filters.minRating, filters.maxRating]}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export function ManufacturerFilters({ filters, onFiltersChange, manufacturers }:
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FilterSection title="Basic Filters">
|
<FilterSection title="Basic Filters">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label>Entity Type</Label>
|
<Label>Entity Type</Label>
|
||||||
<Select
|
<Select
|
||||||
@@ -126,7 +126,7 @@ export function ManufacturerFilters({ filters, onFiltersChange, manufacturers }:
|
|||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
<FilterSection title="Statistics">
|
<FilterSection title="Statistics">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterRangeSlider
|
<FilterRangeSlider
|
||||||
label="Rating"
|
label="Rating"
|
||||||
value={[filters.minRating, filters.maxRating]}
|
value={[filters.minRating, filters.maxRating]}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export function OperatorFilters({ filters, onFiltersChange, operators }: Operato
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FilterSection title="Basic Filters">
|
<FilterSection title="Basic Filters">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterMultiSelectCombobox
|
<FilterMultiSelectCombobox
|
||||||
label="Headquarters Country"
|
label="Headquarters Country"
|
||||||
options={countryOptions}
|
options={countryOptions}
|
||||||
@@ -111,7 +111,7 @@ export function OperatorFilters({ filters, onFiltersChange, operators }: Operato
|
|||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
<FilterSection title="Statistics">
|
<FilterSection title="Statistics">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterRangeSlider
|
<FilterRangeSlider
|
||||||
label="Rating"
|
label="Rating"
|
||||||
value={[filters.minRating, filters.maxRating]}
|
value={[filters.minRating, filters.maxRating]}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export function ParkFilters({ filters, onFiltersChange, parks }: ParkFiltersProp
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FilterSection title="Basic Filters">
|
<FilterSection title="Basic Filters">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
{/* Park Type */}
|
{/* Park Type */}
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label>Park Type</Label>
|
<Label>Park Type</Label>
|
||||||
@@ -227,7 +227,7 @@ export function ParkFilters({ filters, onFiltersChange, parks }: ParkFiltersProp
|
|||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
<FilterSection title="Operators & Owners">
|
<FilterSection title="Operators & Owners">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterMultiSelectCombobox
|
<FilterMultiSelectCombobox
|
||||||
label="Operators"
|
label="Operators"
|
||||||
options={operatorOptions}
|
options={operatorOptions}
|
||||||
@@ -248,7 +248,7 @@ export function ParkFilters({ filters, onFiltersChange, parks }: ParkFiltersProp
|
|||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
<FilterSection title="Opening Dates">
|
<FilterSection title="Opening Dates">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterDateRangePicker
|
<FilterDateRangePicker
|
||||||
label="Opening Year"
|
label="Opening Year"
|
||||||
fromDate={filters.openingYearStart ? new Date(filters.openingYearStart, 0, 1) : null}
|
fromDate={filters.openingYearStart ? new Date(filters.openingYearStart, 0, 1) : null}
|
||||||
@@ -270,7 +270,7 @@ export function ParkFilters({ filters, onFiltersChange, parks }: ParkFiltersProp
|
|||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
<FilterSection title="Statistics">
|
<FilterSection title="Statistics">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterRangeSlider
|
<FilterRangeSlider
|
||||||
label="Rating"
|
label="Rating"
|
||||||
value={[filters.minRating, filters.maxRating]}
|
value={[filters.minRating, filters.maxRating]}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ interface ParkGridViewProps {
|
|||||||
|
|
||||||
export function ParkGridView({ parks }: ParkGridViewProps) {
|
export function ParkGridView({ parks }: ParkGridViewProps) {
|
||||||
return (
|
return (
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7 3xl:grid-cols-8 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 3xl:grid-cols-6 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
||||||
{parks.map((park) => (
|
{parks.map((park) => (
|
||||||
<ParkCard
|
<ParkCard
|
||||||
key={park.id}
|
key={park.id}
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ export function ParkSortOptions({ sort, onSortChange }: ParkSortOptionsProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-2 w-full">
|
<div className="flex gap-2 flex-1">
|
||||||
<Select
|
<Select
|
||||||
value={sort.field}
|
value={sort.field}
|
||||||
onValueChange={(field) => onSortChange({ ...sort, field })}
|
onValueChange={(field) => onSortChange({ ...sort, field })}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="flex-1 sm:w-48 bg-muted/50 border-border/50">
|
<SelectTrigger className="flex-1 bg-muted/50 border-border/50">
|
||||||
<ArrowUpDown className="w-4 h-4 mr-2" />
|
<ArrowUpDown className="w-4 h-4 mr-2" />
|
||||||
<SelectValue />
|
<SelectValue />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ export function RideFilters({ filters, onFiltersChange, rides }: RideFiltersProp
|
|||||||
|
|
||||||
{/* Basic Filters */}
|
{/* Basic Filters */}
|
||||||
<FilterSection title="Basic Filters">
|
<FilterSection title="Basic Filters">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterMultiSelectCombobox
|
<FilterMultiSelectCombobox
|
||||||
label="Categories"
|
label="Categories"
|
||||||
options={categoryOptions}
|
options={categoryOptions}
|
||||||
@@ -252,7 +252,7 @@ export function RideFilters({ filters, onFiltersChange, rides }: RideFiltersProp
|
|||||||
|
|
||||||
{/* Geographic Filters */}
|
{/* Geographic Filters */}
|
||||||
<FilterSection title="Location">
|
<FilterSection title="Location">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterMultiSelectCombobox
|
<FilterMultiSelectCombobox
|
||||||
label="Countries"
|
label="Countries"
|
||||||
options={countryOptions}
|
options={countryOptions}
|
||||||
@@ -281,7 +281,7 @@ export function RideFilters({ filters, onFiltersChange, rides }: RideFiltersProp
|
|||||||
|
|
||||||
{/* Relationship Filters */}
|
{/* Relationship Filters */}
|
||||||
<FilterSection title="Parks & Companies">
|
<FilterSection title="Parks & Companies">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterMultiSelectCombobox
|
<FilterMultiSelectCombobox
|
||||||
label="Parks"
|
label="Parks"
|
||||||
options={parkOptions}
|
options={parkOptions}
|
||||||
@@ -310,7 +310,7 @@ export function RideFilters({ filters, onFiltersChange, rides }: RideFiltersProp
|
|||||||
|
|
||||||
{/* Coaster-Specific Filters */}
|
{/* Coaster-Specific Filters */}
|
||||||
<FilterSection title="Coaster Details">
|
<FilterSection title="Coaster Details">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterMultiSelectCombobox
|
<FilterMultiSelectCombobox
|
||||||
label="Coaster Type"
|
label="Coaster Type"
|
||||||
options={coasterTypeOptions}
|
options={coasterTypeOptions}
|
||||||
@@ -346,7 +346,7 @@ export function RideFilters({ filters, onFiltersChange, rides }: RideFiltersProp
|
|||||||
|
|
||||||
{/* Numeric Range Filters */}
|
{/* Numeric Range Filters */}
|
||||||
<FilterSection title="Statistics">
|
<FilterSection title="Statistics">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterRangeSlider
|
<FilterRangeSlider
|
||||||
label="Speed"
|
label="Speed"
|
||||||
value={[filters.minSpeed, filters.maxSpeed]}
|
value={[filters.minSpeed, filters.maxSpeed]}
|
||||||
@@ -389,7 +389,7 @@ export function RideFilters({ filters, onFiltersChange, rides }: RideFiltersProp
|
|||||||
|
|
||||||
{/* Date Filters */}
|
{/* Date Filters */}
|
||||||
<FilterSection title="Dates">
|
<FilterSection title="Dates">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 gap-4">
|
||||||
<FilterDateRangePicker
|
<FilterDateRangePicker
|
||||||
label="Opening Date"
|
label="Opening Date"
|
||||||
fromDate={filters.openingDateFrom}
|
fromDate={filters.openingDateFrom}
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export default function Designers() {
|
|||||||
<Button
|
<Button
|
||||||
variant={showFilters ? "default" : "outline"}
|
variant={showFilters ? "default" : "outline"}
|
||||||
onClick={() => setShowFilters(!showFilters)}
|
onClick={() => setShowFilters(!showFilters)}
|
||||||
className="gap-2"
|
className="gap-2 lg:hidden"
|
||||||
>
|
>
|
||||||
<Filter className="w-4 h-4" />
|
<Filter className="w-4 h-4" />
|
||||||
<span className="hidden sm:inline">Filters</span>
|
<span className="hidden sm:inline">Filters</span>
|
||||||
@@ -176,33 +176,52 @@ export default function Designers() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
{/* Mobile Filters */}
|
||||||
<CollapsibleContent>
|
<div className="lg:hidden">
|
||||||
<Card className="mt-4">
|
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
||||||
|
<CollapsibleContent>
|
||||||
|
<Card className="mt-4">
|
||||||
|
<CardContent className="pt-6">
|
||||||
|
<DesignerFilters filters={filters} onFiltersChange={setFilters} designers={companies} />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</CollapsibleContent>
|
||||||
|
</Collapsible>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Main Content Area with Sidebar */}
|
||||||
|
<div className="flex flex-col lg:flex-row gap-6">
|
||||||
|
{/* Desktop Filter Sidebar */}
|
||||||
|
<aside className="hidden lg:block lg:w-[340px] xl:w-[380px] 2xl:w-[420px] flex-shrink-0">
|
||||||
|
<div className="sticky top-24">
|
||||||
|
<Card>
|
||||||
<CardContent className="pt-6">
|
<CardContent className="pt-6">
|
||||||
<DesignerFilters filters={filters} onFiltersChange={setFilters} designers={companies} />
|
<DesignerFilters filters={filters} onFiltersChange={setFilters} designers={companies} />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</CollapsibleContent>
|
</div>
|
||||||
</Collapsible>
|
</aside>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Companies Grid */}
|
{/* Results Area */}
|
||||||
{filteredCompanies.length > 0 ? (
|
<div className="flex-1 min-w-0">
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7 3xl:grid-cols-8 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
{filteredCompanies.length > 0 ? (
|
||||||
{filteredCompanies.map((company) => (
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6 3xl:grid-cols-7 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
||||||
<DesignerCard key={company.id} company={company} />
|
{filteredCompanies.map((company) => (
|
||||||
))}
|
<DesignerCard key={company.id} company={company} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="text-center py-12">
|
||||||
|
<Ruler className="w-16 h-16 mb-4 mx-auto text-muted-foreground" />
|
||||||
|
<h3 className="text-xl font-semibold mb-2">No designers found</h3>
|
||||||
|
<p className="text-muted-foreground">
|
||||||
|
Try adjusting your search criteria
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
</div>
|
||||||
<div className="text-center py-12">
|
|
||||||
<Ruler className="w-16 h-16 mb-4 mx-auto text-muted-foreground" />
|
|
||||||
<h3 className="text-xl font-semibold mb-2">No designers found</h3>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
Try adjusting your search criteria
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</main>
|
</main>
|
||||||
<Dialog open={isCreateModalOpen} onOpenChange={setIsCreateModalOpen}>
|
<Dialog open={isCreateModalOpen} onOpenChange={setIsCreateModalOpen}>
|
||||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ export default function Manufacturers() {
|
|||||||
<Button
|
<Button
|
||||||
variant={showFilters ? "default" : "outline"}
|
variant={showFilters ? "default" : "outline"}
|
||||||
onClick={() => setShowFilters(!showFilters)}
|
onClick={() => setShowFilters(!showFilters)}
|
||||||
className="gap-2"
|
className="gap-2 lg:hidden"
|
||||||
>
|
>
|
||||||
<Filter className="w-4 h-4" />
|
<Filter className="w-4 h-4" />
|
||||||
<span className="hidden sm:inline">Filters</span>
|
<span className="hidden sm:inline">Filters</span>
|
||||||
@@ -189,33 +189,52 @@ export default function Manufacturers() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
{/* Mobile Filters */}
|
||||||
<CollapsibleContent>
|
<div className="lg:hidden">
|
||||||
<Card className="mt-4">
|
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
||||||
|
<CollapsibleContent>
|
||||||
|
<Card className="mt-4">
|
||||||
|
<CardContent className="pt-6">
|
||||||
|
<ManufacturerFilters filters={filters} onFiltersChange={setFilters} manufacturers={companies} />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</CollapsibleContent>
|
||||||
|
</Collapsible>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Main Content Area with Sidebar */}
|
||||||
|
<div className="flex flex-col lg:flex-row gap-6">
|
||||||
|
{/* Desktop Filter Sidebar */}
|
||||||
|
<aside className="hidden lg:block lg:w-[340px] xl:w-[380px] 2xl:w-[420px] flex-shrink-0">
|
||||||
|
<div className="sticky top-24">
|
||||||
|
<Card>
|
||||||
<CardContent className="pt-6">
|
<CardContent className="pt-6">
|
||||||
<ManufacturerFilters filters={filters} onFiltersChange={setFilters} manufacturers={companies} />
|
<ManufacturerFilters filters={filters} onFiltersChange={setFilters} manufacturers={companies} />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</CollapsibleContent>
|
</div>
|
||||||
</Collapsible>
|
</aside>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Companies Grid */}
|
{/* Results Area */}
|
||||||
{filteredCompanies.length > 0 ? (
|
<div className="flex-1 min-w-0">
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7 3xl:grid-cols-8 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
{filteredCompanies.length > 0 ? (
|
||||||
{filteredCompanies.map((company) => (
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6 3xl:grid-cols-7 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
||||||
<ManufacturerCard key={company.id} company={company} />
|
{filteredCompanies.map((company) => (
|
||||||
))}
|
<ManufacturerCard key={company.id} company={company} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="text-center py-12">
|
||||||
|
<Factory className="w-16 h-16 mb-4 mx-auto text-muted-foreground" />
|
||||||
|
<h3 className="text-xl font-semibold mb-2">No manufacturers found</h3>
|
||||||
|
<p className="text-muted-foreground">
|
||||||
|
Try adjusting your search criteria
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
</div>
|
||||||
<div className="text-center py-12">
|
|
||||||
<Factory className="w-16 h-16 mb-4 mx-auto text-muted-foreground" />
|
|
||||||
<h3 className="text-xl font-semibold mb-2">No manufacturers found</h3>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
Try adjusting your search criteria
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{/* Create Modal */}
|
{/* Create Modal */}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ const Operators = () => {
|
|||||||
<Button
|
<Button
|
||||||
variant={showFilters ? "default" : "outline"}
|
variant={showFilters ? "default" : "outline"}
|
||||||
onClick={() => setShowFilters(!showFilters)}
|
onClick={() => setShowFilters(!showFilters)}
|
||||||
className="gap-2"
|
className="gap-2 lg:hidden"
|
||||||
>
|
>
|
||||||
<Filter className="w-4 h-4" />
|
<Filter className="w-4 h-4" />
|
||||||
<span className="hidden sm:inline">Filters</span>
|
<span className="hidden sm:inline">Filters</span>
|
||||||
@@ -247,49 +247,68 @@ const Operators = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
{/* Mobile Filters */}
|
||||||
<CollapsibleContent>
|
<div className="lg:hidden">
|
||||||
<Card className="mt-4">
|
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
||||||
|
<CollapsibleContent>
|
||||||
|
<Card className="mt-4">
|
||||||
|
<CardContent className="pt-6">
|
||||||
|
<OperatorFilters filters={filters} onFiltersChange={setFilters} operators={operators || []} />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</CollapsibleContent>
|
||||||
|
</Collapsible>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Main Content Area with Sidebar */}
|
||||||
|
<div className="flex flex-col lg:flex-row gap-6">
|
||||||
|
{/* Desktop Filter Sidebar */}
|
||||||
|
<aside className="hidden lg:block lg:w-[340px] xl:w-[380px] 2xl:w-[420px] flex-shrink-0">
|
||||||
|
<div className="sticky top-24">
|
||||||
|
<Card>
|
||||||
<CardContent className="pt-6">
|
<CardContent className="pt-6">
|
||||||
<OperatorFilters filters={filters} onFiltersChange={setFilters} operators={operators || []} />
|
<OperatorFilters filters={filters} onFiltersChange={setFilters} operators={operators || []} />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</CollapsibleContent>
|
</div>
|
||||||
</Collapsible>
|
</aside>
|
||||||
|
|
||||||
|
{/* Results Area */}
|
||||||
|
<div className="flex-1 min-w-0">
|
||||||
|
{/* Loading State */}
|
||||||
|
{isLoading && (
|
||||||
|
<div className="text-center py-12">
|
||||||
|
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"></div>
|
||||||
|
<p className="text-muted-foreground mt-4">Loading park operators...</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Operators Grid */}
|
||||||
|
{!isLoading && filteredAndSortedOperators && filteredAndSortedOperators.length > 0 && (
|
||||||
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6 3xl:grid-cols-7 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
||||||
|
{filteredAndSortedOperators.map((operator) => (
|
||||||
|
<OperatorCard key={operator.id} company={operator} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Empty State */}
|
||||||
|
{!isLoading && filteredAndSortedOperators?.length === 0 && (
|
||||||
|
<div className="text-center py-12">
|
||||||
|
<Building className="h-12 w-12 text-muted-foreground mx-auto mb-4" />
|
||||||
|
<h3 className="text-lg font-semibold mb-2">No park operators found</h3>
|
||||||
|
<p className="text-muted-foreground">
|
||||||
|
{searchTerm
|
||||||
|
? "Try adjusting your search terms or filters"
|
||||||
|
: "No park operators are currently available"
|
||||||
|
}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{/* Loading State */}
|
|
||||||
{isLoading && (
|
|
||||||
<div className="text-center py-12">
|
|
||||||
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"></div>
|
|
||||||
<p className="text-muted-foreground mt-4">Loading park operators...</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Operators Grid */}
|
|
||||||
{!isLoading && filteredAndSortedOperators && (
|
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7 3xl:grid-cols-8 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
|
||||||
{filteredAndSortedOperators.map((operator) => (
|
|
||||||
<OperatorCard key={operator.id} company={operator} />
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Empty State */}
|
|
||||||
{!isLoading && filteredAndSortedOperators?.length === 0 && (
|
|
||||||
<div className="text-center py-12">
|
|
||||||
<Building className="h-12 w-12 text-muted-foreground mx-auto mb-4" />
|
|
||||||
<h3 className="text-lg font-semibold mb-2">No park operators found</h3>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
{searchTerm
|
|
||||||
? "Try adjusting your search terms or filters"
|
|
||||||
: "No park operators are currently available"
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Create Modal */}
|
{/* Create Modal */}
|
||||||
<Dialog open={isCreateModalOpen} onOpenChange={setIsCreateModalOpen}>
|
<Dialog open={isCreateModalOpen} onOpenChange={setIsCreateModalOpen}>
|
||||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
||||||
|
|||||||
@@ -402,18 +402,16 @@ export default function Parks() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex gap-2 w-full lg:w-auto">
|
<div className="flex gap-2 flex-1">
|
||||||
<div className="flex-1 sm:flex-none">
|
<ParkSortOptions
|
||||||
<ParkSortOptions
|
sort={sort}
|
||||||
sort={sort}
|
onSortChange={setSort}
|
||||||
onSortChange={setSort}
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant={showFilters ? "default" : "outline"}
|
variant={showFilters ? "default" : "outline"}
|
||||||
onClick={() => setShowFilters(!showFilters)}
|
onClick={() => setShowFilters(!showFilters)}
|
||||||
className="shrink-0 gap-2"
|
className="shrink-0 gap-2 lg:hidden"
|
||||||
>
|
>
|
||||||
<Filter className="w-4 h-4" />
|
<Filter className="w-4 h-4" />
|
||||||
<span className="hidden sm:inline">Filters</span>
|
<span className="hidden sm:inline">Filters</span>
|
||||||
@@ -425,7 +423,7 @@ export default function Parks() {
|
|||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Tabs value={viewMode} onValueChange={(v) => setViewMode(v as 'grid' | 'list')} className="flex-1 sm:flex-none hidden md:inline-flex">
|
<Tabs value={viewMode} onValueChange={(v) => setViewMode(v as 'grid' | 'list')} className="hidden md:inline-flex">
|
||||||
<TabsList>
|
<TabsList>
|
||||||
<TabsTrigger value="grid">
|
<TabsTrigger value="grid">
|
||||||
<Grid3X3 className="w-4 h-4" />
|
<Grid3X3 className="w-4 h-4" />
|
||||||
@@ -438,9 +436,29 @@ export default function Parks() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Advanced Filters Panel */}
|
{/* Mobile Filters */}
|
||||||
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
<div className="lg:hidden">
|
||||||
<CollapsibleContent>
|
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
||||||
|
<CollapsibleContent>
|
||||||
|
<Card>
|
||||||
|
<CardContent className="pt-6">
|
||||||
|
<ParkFilters
|
||||||
|
filters={filters}
|
||||||
|
onFiltersChange={setFilters}
|
||||||
|
parks={parks}
|
||||||
|
/>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</CollapsibleContent>
|
||||||
|
</Collapsible>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Main Content Area with Sidebar */}
|
||||||
|
<div className="flex flex-col lg:flex-row gap-6">
|
||||||
|
{/* Desktop Filter Sidebar */}
|
||||||
|
<aside className="hidden lg:block lg:w-[340px] xl:w-[380px] 2xl:w-[420px] flex-shrink-0">
|
||||||
|
<div className="sticky top-24">
|
||||||
<Card>
|
<Card>
|
||||||
<CardContent className="pt-6">
|
<CardContent className="pt-6">
|
||||||
<ParkFilters
|
<ParkFilters
|
||||||
@@ -450,36 +468,38 @@ export default function Parks() {
|
|||||||
/>
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</CollapsibleContent>
|
</div>
|
||||||
</Collapsible>
|
</aside>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Results */}
|
{/* Results Area */}
|
||||||
{filteredAndSortedParks.length > 0 ? (
|
<div className="flex-1 min-w-0">
|
||||||
<div>
|
{filteredAndSortedParks.length > 0 ? (
|
||||||
{viewMode === 'grid' ? (
|
<div>
|
||||||
<ParkGridView
|
{viewMode === 'grid' ? (
|
||||||
parks={filteredAndSortedParks}
|
<ParkGridView
|
||||||
/>
|
parks={filteredAndSortedParks}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<ParkListView
|
||||||
|
parks={filteredAndSortedParks}
|
||||||
|
onParkClick={handleParkClick}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<ParkListView
|
<div className="text-center py-12">
|
||||||
parks={filteredAndSortedParks}
|
<FerrisWheel className="w-16 h-16 mb-4 opacity-50 mx-auto" />
|
||||||
onParkClick={handleParkClick}
|
<h3 className="text-xl font-semibold mb-2">No parks found</h3>
|
||||||
/>
|
<p className="text-muted-foreground mb-4">
|
||||||
|
Try adjusting your search terms or filters
|
||||||
|
</p>
|
||||||
|
<Button onClick={clearAllFilters} variant="outline">
|
||||||
|
Clear all filters
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
</div>
|
||||||
<div className="text-center py-12">
|
|
||||||
<FerrisWheel className="w-16 h-16 mb-4 opacity-50 mx-auto" />
|
|
||||||
<h3 className="text-xl font-semibold mb-2">No parks found</h3>
|
|
||||||
<p className="text-muted-foreground mb-4">
|
|
||||||
Try adjusting your search terms or filters
|
|
||||||
</p>
|
|
||||||
<Button onClick={clearAllFilters} variant="outline">
|
|
||||||
Clear all filters
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Add Park Modal */}
|
{/* Add Park Modal */}
|
||||||
<Dialog open={isAddParkModalOpen} onOpenChange={setIsAddParkModalOpen}>
|
<Dialog open={isAddParkModalOpen} onOpenChange={setIsAddParkModalOpen}>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export default function Rides() {
|
|||||||
<Button
|
<Button
|
||||||
variant={showFilters ? "default" : "outline"}
|
variant={showFilters ? "default" : "outline"}
|
||||||
onClick={() => setShowFilters(!showFilters)}
|
onClick={() => setShowFilters(!showFilters)}
|
||||||
className="gap-2"
|
className="gap-2 lg:hidden"
|
||||||
>
|
>
|
||||||
<Filter className="w-4 h-4" />
|
<Filter className="w-4 h-4" />
|
||||||
<span className="hidden sm:inline">Filters</span>
|
<span className="hidden sm:inline">Filters</span>
|
||||||
@@ -196,33 +196,52 @@ export default function Rides() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
{/* Mobile Filters */}
|
||||||
<CollapsibleContent>
|
<div className="lg:hidden">
|
||||||
|
<Collapsible open={showFilters} onOpenChange={setShowFilters}>
|
||||||
|
<CollapsibleContent>
|
||||||
|
<Card>
|
||||||
|
<CardContent className="pt-6">
|
||||||
|
<RideFilters filters={filters} onFiltersChange={setFilters} rides={rides} />
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</CollapsibleContent>
|
||||||
|
</Collapsible>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Main Content Area with Sidebar */}
|
||||||
|
<div className="flex flex-col lg:flex-row gap-6">
|
||||||
|
{/* Desktop Filter Sidebar */}
|
||||||
|
<aside className="hidden lg:block lg:w-[340px] xl:w-[380px] 2xl:w-[420px] flex-shrink-0">
|
||||||
|
<div className="sticky top-24">
|
||||||
<Card>
|
<Card>
|
||||||
<CardContent className="pt-6">
|
<CardContent className="pt-6">
|
||||||
<RideFilters filters={filters} onFiltersChange={setFilters} rides={rides} />
|
<RideFilters filters={filters} onFiltersChange={setFilters} rides={rides} />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</CollapsibleContent>
|
</div>
|
||||||
</Collapsible>
|
</aside>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Rides Grid */}
|
{/* Results Area */}
|
||||||
{filteredRides.length > 0 ? (
|
<div className="flex-1 min-w-0">
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7 3xl:grid-cols-8 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
{filteredRides.length > 0 ? (
|
||||||
{filteredRides.map((ride) => (
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6 3xl:grid-cols-7 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
||||||
<RideCard key={ride.id} ride={ride} showParkName={true} />
|
{filteredRides.map((ride) => (
|
||||||
))}
|
<RideCard key={ride.id} ride={ride} showParkName={true} />
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="text-center py-12">
|
||||||
|
<FerrisWheel className="w-16 h-16 mb-4 mx-auto text-muted-foreground" />
|
||||||
|
<h3 className="text-xl font-semibold mb-2">No rides found</h3>
|
||||||
|
<p className="text-muted-foreground">
|
||||||
|
Try adjusting your search criteria or filters
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
</div>
|
||||||
<div className="text-center py-12">
|
|
||||||
<FerrisWheel className="w-16 h-16 mb-4 mx-auto text-muted-foreground" />
|
|
||||||
<h3 className="text-xl font-semibold mb-2">No rides found</h3>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
Try adjusting your search criteria or filters
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Create Modal */}
|
{/* Create Modal */}
|
||||||
<Dialog open={isCreateModalOpen} onOpenChange={setIsCreateModalOpen}>
|
<Dialog open={isCreateModalOpen} onOpenChange={setIsCreateModalOpen}>
|
||||||
|
|||||||
Reference in New Issue
Block a user