mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-22 05:11:11 -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,10 +1,10 @@
|
||||
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
|
||||
<div class="bg-white rounded-lg shadow p-6">
|
||||
{{-- Show message if exists --}}
|
||||
@if ($message)
|
||||
<div @class([
|
||||
'p-4 mb-4 rounded-lg',
|
||||
'bg-green-100 dark:bg-green-800 text-green-700 dark:text-green-200' => !str_contains($message, 'error') && !str_contains($message, 'cannot'),
|
||||
'bg-red-100 dark:bg-red-800 text-red-700 dark:text-red-200' => str_contains($message, 'error') || str_contains($message, 'cannot'),
|
||||
'bg-green-100 text-green-700' => !str_contains($message, 'error') && !str_contains($message, 'cannot'),
|
||||
'bg-red-100 text-red-700' => str_contains($message, 'error') || str_contains($message, 'cannot'),
|
||||
])>
|
||||
{{ $message }}
|
||||
</div>
|
||||
@@ -14,7 +14,7 @@
|
||||
<form wire:submit="save" class="space-y-6">
|
||||
{{-- Star Rating --}}
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
|
||||
<label class="block text-sm font-medium text-gray-700 mb-2">
|
||||
Rating <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<div class="flex items-center space-x-2">
|
||||
@@ -26,50 +26,50 @@
|
||||
>
|
||||
<span @class([
|
||||
'text-yellow-400' => $i <= $rating,
|
||||
'text-gray-300 dark:text-gray-600' => $i > $rating,
|
||||
'text-gray-300' => $i > $rating,
|
||||
])>★</span>
|
||||
</button>
|
||||
@endfor
|
||||
</div>
|
||||
@error('rating')
|
||||
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
{{-- Title Field --}}
|
||||
<div>
|
||||
<label for="title" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<label for="title" class="block text-sm font-medium text-gray-700">
|
||||
Title <span class="text-gray-500">(optional)</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="title"
|
||||
wire:model="title"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
||||
placeholder="Give your review a title"
|
||||
>
|
||||
@error('title')
|
||||
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
{{-- Content Field --}}
|
||||
<div>
|
||||
<label for="content" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<label for="content" class="block text-sm font-medium text-gray-700">
|
||||
Review <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<textarea
|
||||
id="content"
|
||||
wire:model="content"
|
||||
rows="4"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
||||
placeholder="Share your experience with this ride"
|
||||
></textarea>
|
||||
<p class="mt-1 text-sm text-gray-500">
|
||||
{{ strlen($content) }}/2000 characters
|
||||
</p>
|
||||
@error('content')
|
||||
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user