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:
pacnpal
2025-06-19 22:34:10 -04:00
parent 86263db9d9
commit cc33781245
148 changed files with 14026 additions and 2482 deletions

View File

@@ -3,19 +3,19 @@
<div class="flex justify-end">
<button type="button"
wire:click="toggleUploadForm"
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 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 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 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
{{ $showUploadForm ? 'Cancel Upload' : 'Upload Photo' }}
</button>
</div>
{{-- Upload Form --}}
@if($showUploadForm)
<div class="bg-white dark:bg-gray-800 shadow sm:rounded-lg p-6">
<div class="bg-white shadow sm:rounded-lg p-6">
<form wire:submit="save">
<div class="space-y-4">
{{-- Photo Upload --}}
<div>
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">Photo</label>
<label class="block text-sm font-medium text-gray-700">Photo</label>
<div class="mt-1 flex items-center">
<input type="file"
wire:model="photo"
@@ -23,11 +23,11 @@
class="sr-only"
id="photo-upload">
<label for="photo-upload"
class="cursor-pointer 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 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:bg-gray-600">
class="cursor-pointer 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 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
Choose File
</label>
@if($photo)
<span class="ml-3 text-sm text-gray-500 dark:text-gray-400">{{ $photo->getClientOriginalName() }}</span>
<span class="ml-3 text-sm text-gray-500">{{ $photo->getClientOriginalName() }}</span>
@endif
</div>
@error('photo') <span class="mt-1 text-sm text-red-500">{{ $message }}</span> @enderror
@@ -35,12 +35,12 @@
{{-- Caption --}}
<div>
<label for="caption" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Caption</label>
<label for="caption" class="block text-sm font-medium text-gray-700">Caption</label>
<div class="mt-1">
<input type="text"
id="caption"
wire:model="caption"
class="shadow-sm focus:ring-primary-500 focus:border-primary-500 block w-full sm:text-sm border-gray-300 rounded-md dark:bg-gray-700 dark:border-gray-600 dark:text-white">
class="shadow-sm focus:ring-primary-500 focus:border-primary-500 block w-full sm:text-sm border-gray-300 rounded-md">
@error('caption') <span class="mt-1 text-sm text-red-500">{{ $message }}</span> @enderror
</div>
</div>
@@ -61,7 +61,7 @@
@if($photos->count() > 0)
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
@foreach($photos as $photo)
<div class="relative group bg-white dark:bg-gray-800 p-2 rounded-lg shadow hover:shadow-lg transition-shadow">
<div class="relative group bg-white p-2 rounded-lg shadow hover:shadow-lg transition-shadow">
<div class="aspect-w-16 aspect-h-9">
<img src="{{ Storage::url($photo->path) }}"
alt="{{ $photo->caption }}"
@@ -70,7 +70,7 @@
{{-- Caption --}}
@if($photo->caption)
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">{{ $photo->caption }}</p>
<p class="mt-2 text-sm text-gray-500">{{ $photo->caption }}</p>
@endif
{{-- Actions --}}
@@ -115,7 +115,7 @@
</div>
@else
<div class="text-center py-12">
<p class="text-gray-500 dark:text-gray-400">No photos uploaded yet.</p>
<p class="text-gray-500">No photos uploaded yet.</p>
</div>
@endif
</div>