fix(admin): resolve issues on tour create page

This commit is contained in:
2026-08-22 10:30:43 +03:30
parent 16585c0de0
commit 90bc348a54
+25 -25
View File
@@ -35,11 +35,11 @@
<div class="col-xl-6">
<label class="form-label">عنوان تور <span class="text-danger">*</span></label>
<input
type="text"
class="form-control"
name="title"
placeholder="مثال: تور تفریحی استانبول ویژه نوروز"
value="{{ old('title') }}"
type="text"
class="form-control"
name="title"
placeholder="مثال: تور تفریحی استانبول ویژه نوروز"
value="{{ old('title') }}"
/>
@error('title')
<span class="text-danger small">{{ $message }}</span>
@@ -53,7 +53,7 @@
<option value="">یک مورد را انتخاب کنید</option>
@foreach(\App\Enums\Tour\TourScope::cases() as $scope)
<option
value="{{ $scope->value }}" {{ old('tour_scope') == $scope->value ? 'selected' : '' }}>
value="{{ $scope->value }}" {{ old('tour_scope') == $scope->value ? 'selected' : '' }}>
{{ method_exists($scope, 'label') ? $scope->label() : $scope->name }}
</option>
@endforeach
@@ -75,12 +75,12 @@
<div class="col-xl-6">
<label class="form-label">نوع حمل و نقل / سفر <span
class="text-danger">*</span></label>
class="text-danger">*</span></label>
<select class="form-control" name="tour_mode">
<option value="">یک مورد را انتخاب کنید</option>
@foreach(\App\Enums\Tour\TourMode::cases() as $mode)
<option
value="{{ $mode->value }}" {{ old('tour_mode') == $mode->value ? 'selected' : '' }}>
value="{{ $mode->value }}" {{ old('tour_mode') == $mode->value ? 'selected' : '' }}>
{{ method_exists($mode, 'label') ? $mode->label() : $mode->name }}
</option>
@endforeach
@@ -95,9 +95,9 @@
<label class="form-label">سبک تور <span class="text-danger">*</span></label>
<select class="form-control" name="tour_type">
<option value="">یک مورد را انتخاب کنید</option>
@foreach(\App\Enums\Flight\TourType::cases() as $type)
@foreach(\App\Enums\Tour\TourType::cases() as $type)
<option
value="{{ $type->value }}" {{ old('tour_type') == $type->value ? 'selected' : '' }}>
value="{{ $type->value }}" {{ old('tour_type') == $type->value ? 'selected' : '' }}>
{{ method_exists($type, 'label') ? $type->label() : $type->name }}
</option>
@endforeach
@@ -114,7 +114,7 @@
<option value="">شهر مبدا را انتخاب کنید</option>
@foreach($cities as $city)
<option
value="{{ $city->id }}" {{ old('origin_city_id') == $city->id ? 'selected' : '' }}>
value="{{ $city->id }}" {{ old('origin_city_id') == $city->id ? 'selected' : '' }}>
{{ $city->name }}
</option>
@endforeach
@@ -131,7 +131,7 @@
<option value="">شهر مقصد را انتخاب کنید</option>
@foreach($cities as $city)
<option
value="{{ $city->id }}" {{ old('destination_city_id') == $city->id ? 'selected' : '' }}>
value="{{ $city->id }}" {{ old('destination_city_id') == $city->id ? 'selected' : '' }}>
{{ $city->name }}
</option>
@endforeach
@@ -206,26 +206,26 @@
<hr class="my-4">
<h6 class="fw-bold mb-2">گالری تصاویر تور</h6>
<div
class="image-upload-wrapper d-flex flex-wrap gap-2 px-0 pt-0 mt-2"
id="imagePreviewContainer"
style="border-radius: 8px; padding: 10px;"
class="image-upload-wrapper d-flex flex-wrap gap-2 px-0 pt-0 mt-2"
id="imagePreviewContainer"
style="border-radius: 8px; padding: 10px;"
>
<label
id="uploadPlaceholder"
class="upload-placeholder"
for="imageInput"
style="cursor: pointer; width:150px; height:150px; display: flex; justify-content: center; align-items: center; border: 2px dashed #ccc; border-radius: 8px; padding: 20px; text-align: center;"
id="uploadPlaceholder"
class="upload-placeholder"
for="imageInput"
style="cursor: pointer; width:150px; height:150px; display: flex; justify-content: center; align-items: center; border: 2px dashed #ccc; border-radius: 8px; padding: 20px; text-align: center;"
>
<div>📷<br><strong>آپلود تصاویر</strong></div>
<small style="color:#999;">JPG / PNG / WEBP</small>
</label>
<input
id="imageInput"
name="images[]"
type="file"
accept=".jpg,.png,.jpeg,.webp"
multiple
style="display:none"
id="imageInput"
name="images[]"
type="file"
accept=".jpg,.png,.jpeg,.webp"
multiple
style="display:none"
/>
</div>
@error('images')