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

@@ -1,12 +1,12 @@
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 mb-6">
<div class="bg-white rounded-lg shadow-md p-6 mb-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">Manage Photos</h3>
<h3 class="text-lg font-semibold text-gray-900">Manage Photos</h3>
<div>
@if (!$reordering)
<button
wire:click="startReordering"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 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-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:bg-gray-600"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 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-blue-500"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" />
@@ -27,7 +27,7 @@
<button
wire:click="cancelReordering"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 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-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:bg-gray-600"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 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-blue-500"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
@@ -47,11 +47,11 @@
</svg>
</div>
@elseif ($error)
<div class="bg-red-50 border border-red-200 text-red-800 px-4 py-3 rounded relative dark:bg-red-900 dark:border-red-800 dark:text-red-200" role="alert">
<div class="bg-red-50 border border-red-200 text-red-800 px-4 py-3 rounded relative" role="alert">
<span class="block sm:inline">{{ $error }}</span>
</div>
@elseif (count($photos) === 0)
<div class="text-center py-12 text-gray-500 dark:text-gray-400">
<div class="text-center py-12 text-gray-500">
<svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12 mx-auto mb-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" />
</svg>
@@ -67,7 +67,7 @@
@if ($photo)
<div
wire:key="photo-order-{{ $photo['id'] }}"
class="flex items-center bg-gray-50 dark:bg-gray-700 rounded-lg overflow-hidden"
class="flex items-center bg-gray-50 rounded-lg overflow-hidden"
>
<div class="w-20 h-20 flex-shrink-0">
<img
@@ -78,11 +78,11 @@
</div>
<div class="flex-1 min-w-0 px-4 py-2">
<p class="text-sm font-medium text-gray-900 dark:text-white truncate">
<p class="text-sm font-medium text-gray-900 truncate">
{{ $photo['title'] ?? 'Untitled Photo' }}
</p>
@if ($photo['description'])
<p class="text-xs text-gray-500 dark:text-gray-400 truncate">
<p class="text-xs text-gray-500 truncate">
{{ $photo['description'] }}
</p>
@endif
@@ -90,7 +90,7 @@
@if ($photo['is_featured'])
<div class="px-2">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-800 dark:text-yellow-100">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">
Featured
</span>
</div>
@@ -100,7 +100,7 @@
<div class="flex items-center space-x-1 px-4">
<button
wire:click="moveUp({{ $index }})"
class="p-1 text-gray-400 hover:text-gray-500 dark:text-gray-300 dark:hover:text-gray-200 {{ $index === 0 ? 'opacity-50 cursor-not-allowed' : '' }}"
class="p-1 text-gray-400 hover:text-gray-500 {{ $index === 0 ? 'opacity-50 cursor-not-allowed' : '' }}"
{{ $index === 0 ? 'disabled' : '' }}
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -110,7 +110,7 @@
<button
wire:click="moveDown({{ $index }})"
class="p-1 text-gray-400 hover:text-gray-500 dark:text-gray-300 dark:hover:text-gray-200 {{ $index === count($photoOrder) - 1 ? 'opacity-50 cursor-not-allowed' : '' }}"
class="p-1 text-gray-400 hover:text-gray-500 {{ $index === count($photoOrder) - 1 ? 'opacity-50 cursor-not-allowed' : '' }}"
{{ $index === count($photoOrder) - 1 ? 'disabled' : '' }}
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">