mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-22 07:31:09 -05:00
feat: Implement rides management with CRUD functionality
- Added rides index view with search and filter options. - Created rides show view to display ride details. - Implemented API routes for rides. - Developed authentication routes for user registration, login, and email verification. - Created tests for authentication, email verification, password reset, and user profile management. - Added feature tests for rides and operators, including creation, updating, deletion, and searching. - Implemented soft deletes and caching for rides and operators. - Enhanced manufacturer and operator model tests for various functionalities.
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
<div class="space-y-4">
|
||||
{{-- Control Panel --}}
|
||||
<div class="bg-white dark:bg-gray-800 shadow sm:rounded-lg p-4">
|
||||
<div class="bg-white shadow sm:rounded-lg p-4">
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
{{-- Search --}}
|
||||
<div>
|
||||
<label for="search" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Search</label>
|
||||
<label for="search" class="block text-sm font-medium text-gray-700">Search</label>
|
||||
<input type="search"
|
||||
id="search"
|
||||
wire:model.live="search"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white sm:text-sm"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm"
|
||||
placeholder="Search rides...">
|
||||
</div>
|
||||
|
||||
{{-- Category Filter --}}
|
||||
<div>
|
||||
<label for="category" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Category</label>
|
||||
<label for="category" class="block text-sm font-medium text-gray-700">Category</label>
|
||||
<select id="category"
|
||||
wire:model.live="category"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white sm:text-sm">
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm">
|
||||
<option value="">All Categories</option>
|
||||
@foreach($this->categories as $value => $label)
|
||||
<option value="{{ $value }}">{{ $label }}</option>
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="flex items-end justify-end">
|
||||
<button type="button"
|
||||
wire:click="toggleView"
|
||||
class="inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:bg-gray-600">
|
||||
class="inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
|
||||
<span>{{ $viewMode === 'grid' ? 'Switch to List' : 'Switch to Grid' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -42,11 +42,11 @@
|
||||
{{-- Grid View --}}
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
@foreach($rides as $ride)
|
||||
<div class="bg-white dark:bg-gray-800 shadow overflow-hidden sm:rounded-lg">
|
||||
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
<div class="flex justify-between items-start">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">
|
||||
<a href="{{ route('rides.show', $ride) }}" class="hover:text-primary-600 dark:hover:text-primary-400">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
||||
<a href="{{ route('rides.show', $ride) }}" class="hover:text-primary-600">
|
||||
{{ $ride->name }}
|
||||
</a>
|
||||
</h3>
|
||||
@@ -55,11 +55,11 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">
|
||||
<p class="text-sm text-gray-500">
|
||||
{{ $ride->park->name }}
|
||||
</p>
|
||||
@if($ride->parkArea)
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">
|
||||
<p class="text-sm text-gray-500">
|
||||
{{ $ride->parkArea->name }}
|
||||
</p>
|
||||
@endif
|
||||
@@ -83,19 +83,19 @@
|
||||
</div>
|
||||
@else
|
||||
{{-- List View --}}
|
||||
<div class="bg-white dark:bg-gray-800 shadow overflow-hidden sm:rounded-lg">
|
||||
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
|
||||
<ul class="divide-y divide-gray-200">
|
||||
@foreach($rides as $ride)
|
||||
<li class="px-4 py-4 sm:px-6 hover:bg-gray-50 dark:hover:bg-gray-700">
|
||||
<li class="px-4 py-4 sm:px-6 hover:bg-gray-50">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex-1 min-w-0">
|
||||
<h3 class="text-sm font-medium text-gray-900 dark:text-white truncate">
|
||||
<a href="{{ route('rides.show', $ride) }}" class="hover:text-primary-600 dark:hover:text-primary-400">
|
||||
<h3 class="text-sm font-medium text-gray-900 truncate">
|
||||
<a href="{{ route('rides.show', $ride) }}" class="hover:text-primary-600">
|
||||
{{ $ride->name }}
|
||||
</a>
|
||||
</h3>
|
||||
<div class="mt-2 flex">
|
||||
<div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
|
||||
<div class="flex items-center text-sm text-gray-500">
|
||||
{{ $ride->park->name }}
|
||||
@if($ride->parkArea)
|
||||
<span class="px-2">•</span>
|
||||
|
||||
Reference in New Issue
Block a user