mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 05:31:10 -05:00
143 lines
8.2 KiB
PHP
143 lines
8.2 KiB
PHP
<div class="max-w-4xl mx-auto p-4 sm:p-6 lg:p-8">
|
|
<form wire:submit="save" class="space-y-6">
|
|
@if (session()->has('message'))
|
|
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" role="alert">
|
|
{{ session('message') }}
|
|
</div>
|
|
@endif
|
|
|
|
<div class="bg-white shadow-sm ring-1 ring-gray-900/5 rounded-xl p-6">
|
|
<!-- Basic Information -->
|
|
<div class="space-y-6">
|
|
<h3 class="text-lg font-medium text-gray-900">Basic Information</h3>
|
|
|
|
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
|
|
<div>
|
|
<label for="name" class="block text-sm font-medium text-gray-700">Park Name</label>
|
|
<div class="mt-1">
|
|
<input type="text" wire:model="name" id="name"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
placeholder="Enter park name">
|
|
</div>
|
|
@error('name') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="operator_id" class="block text-sm font-medium text-gray-700">Operator</label>
|
|
<div class="mt-1">
|
|
<select wire:model="operator_id" id="operator_id"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm">
|
|
<option value="">Select an operator</option>
|
|
@foreach($operators as $operator)
|
|
<option value="{{ $operator['id'] }}">{{ $operator['name'] }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
@error('operator_id') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="description" class="block text-sm font-medium text-gray-700">Description</label>
|
|
<div class="mt-1">
|
|
<textarea wire:model="description" id="description" rows="4"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
placeholder="Enter park description"></textarea>
|
|
</div>
|
|
@error('description') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white shadow-sm ring-1 ring-gray-900/5 rounded-xl p-6">
|
|
<!-- Status and Dates -->
|
|
<div class="space-y-6">
|
|
<h3 class="text-lg font-medium text-gray-900">Status and Dates</h3>
|
|
|
|
<div class="grid grid-cols-1 gap-6 sm:grid-cols-3">
|
|
<div>
|
|
<label for="status" class="block text-sm font-medium text-gray-700">Status</label>
|
|
<div class="mt-1">
|
|
<select wire:model="status" id="status"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm">
|
|
@foreach($statusOptions as $value => $label)
|
|
<option value="{{ $value }}">{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
@error('status') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="opening_date" class="block text-sm font-medium text-gray-700">Opening Date</label>
|
|
<div class="mt-1">
|
|
<input type="date" wire:model="opening_date" id="opening_date"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm">
|
|
</div>
|
|
@error('opening_date') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="closing_date" class="block text-sm font-medium text-gray-700">Closing Date</label>
|
|
<div class="mt-1">
|
|
<input type="date" wire:model="closing_date" id="closing_date"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm">
|
|
</div>
|
|
@error('closing_date') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white shadow-sm ring-1 ring-gray-900/5 rounded-xl p-6">
|
|
<!-- Additional Details -->
|
|
<div class="space-y-6">
|
|
<h3 class="text-lg font-medium text-gray-900">Additional Details</h3>
|
|
|
|
<div class="grid grid-cols-1 gap-6 sm:grid-cols-3">
|
|
<div>
|
|
<label for="operating_season" class="block text-sm font-medium text-gray-700">Operating Season</label>
|
|
<div class="mt-1">
|
|
<input type="text" wire:model="operating_season" id="operating_season"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
placeholder="e.g., March - November">
|
|
</div>
|
|
@error('operating_season') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="size_acres" class="block text-sm font-medium text-gray-700">Size (Acres)</label>
|
|
<div class="mt-1">
|
|
<input type="number" step="0.01" wire:model="size_acres" id="size_acres"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
placeholder="e.g., 100.5">
|
|
</div>
|
|
@error('size_acres') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="website" class="block text-sm font-medium text-gray-700">Website</label>
|
|
<div class="mt-1">
|
|
<input type="url" wire:model="website" id="website"
|
|
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
placeholder="https://example.com">
|
|
</div>
|
|
@error('website') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex justify-end space-x-4">
|
|
<a href="{{ route('parks.index') }}"
|
|
class="inline-flex justify-center rounded-md border border-gray-300 bg-white py-2 px-4 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
Cancel
|
|
</a>
|
|
|
|
<button type="submit"
|
|
class="inline-flex justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
|
|
{{ $park ? 'Update Park' : 'Create Park' }}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div> |