refactor(enums): reorganize namespaces and update flight/tour/user imports

This commit is contained in:
2026-08-20 13:01:03 +03:30
parent a45dc7b0fb
commit 8d0cd16384
20 changed files with 237 additions and 181 deletions
@@ -56,8 +56,9 @@ unset($__errorArgs, $__bag); ?>
<label class="form-label">گستره تور <span class="text-danger">*</span></label>
<select class="form-control" name="tour_scope">
<option value="">یک مورد را انتخاب کنید</option>
<?php $__currentLoopData = \App\Enums\Admin\Tour\TourScope::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $scope): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($scope->value); ?>" <?php echo e(old('tour_scope') == $scope->value ? 'selected' : ''); ?>>
<?php $__currentLoopData = \App\Enums\Tour\TourScope::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $scope): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option
value="<?php echo e($scope->value); ?>" <?php echo e(old('tour_scope') == $scope->value ? 'selected' : ''); ?>>
<?php echo e(method_exists($scope, 'label') ? $scope->label() : $scope->name); ?>
</option>
@@ -86,11 +87,13 @@ unset($__errorArgs, $__bag); ?>
</div>
<div class="col-xl-6">
<label class="form-label">نوع حمل و نقل / سفر <span class="text-danger">*</span></label>
<label class="form-label">نوع حمل و نقل / سفر <span
class="text-danger">*</span></label>
<select class="form-control" name="tour_mode">
<option value="">یک مورد را انتخاب کنید</option>
<?php $__currentLoopData = \App\Enums\Admin\Tour\TourMode::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mode): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($mode->value); ?>" <?php echo e(old('tour_mode') == $mode->value ? 'selected' : ''); ?>>
<?php $__currentLoopData = \App\Enums\Tour\TourMode::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mode): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option
value="<?php echo e($mode->value); ?>" <?php echo e(old('tour_mode') == $mode->value ? 'selected' : ''); ?>>
<?php echo e(method_exists($mode, 'label') ? $mode->label() : $mode->name); ?>
</option>
@@ -113,8 +116,9 @@ unset($__errorArgs, $__bag); ?>
<label class="form-label">سبک تور <span class="text-danger">*</span></label>
<select class="form-control" name="tour_type">
<option value="">یک مورد را انتخاب کنید</option>
<?php $__currentLoopData = \App\Enums\Admin\Tour\TourType::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($type->value); ?>" <?php echo e(old('tour_type') == $type->value ? 'selected' : ''); ?>>
<?php $__currentLoopData = \App\Enums\Flight\TourType::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option
value="<?php echo e($type->value); ?>" <?php echo e(old('tour_type') == $type->value ? 'selected' : ''); ?>>
<?php echo e(method_exists($type, 'label') ? $type->label() : $type->name); ?>
</option>
@@ -138,7 +142,8 @@ unset($__errorArgs, $__bag); ?>
<select class="form-control select2" name="origin_city_id">
<option value="">شهر مبدا را انتخاب کنید</option>
<?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($city->id); ?>" <?php echo e(old('origin_city_id') == $city->id ? 'selected' : ''); ?>>
<option
value="<?php echo e($city->id); ?>" <?php echo e(old('origin_city_id') == $city->id ? 'selected' : ''); ?>>
<?php echo e($city->name); ?>
</option>
@@ -162,7 +167,8 @@ unset($__errorArgs, $__bag); ?>
<select class="form-control select2" name="destination_city_id">
<option value="">شهر مقصد را انتخاب کنید</option>
<?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($city->id); ?>" <?php echo e(old('destination_city_id') == $city->id ? 'selected' : ''); ?>>
<option
value="<?php echo e($city->id); ?>" <?php echo e(old('destination_city_id') == $city->id ? 'selected' : ''); ?>>
<?php echo e($city->name); ?>
</option>
@@ -183,7 +189,8 @@ unset($__errorArgs, $__bag); ?>
<div class="col-xl-12">
<label class="form-label">خلاصه تور</label>
<textarea class="form-control" name="summary" rows="2" placeholder="توضیح کوتاه و جذاب در مورد تور..."><?php echo e(old('summary')); ?></textarea>
<textarea class="form-control" name="summary" rows="2"
placeholder="توضیح کوتاه و جذاب در مورد تور..."><?php echo e(old('summary')); ?></textarea>
<?php $__errorArgs = ['summary'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
@@ -198,7 +205,8 @@ unset($__errorArgs, $__bag); ?>
<div class="col-xl-12">
<label class="form-label">توضیحات کامل و برنامه سفر</label>
<textarea class="form-control" name="description" rows="5" placeholder="جزئیات برنامه سفر، خدمات تور و توضیحات تکمیلی..."><?php echo e(old('description')); ?></textarea>
<textarea class="form-control" name="description" rows="5"
placeholder="جزئیات برنامه سفر، خدمات تور و توضیحات تکمیلی..."><?php echo e(old('description')); ?></textarea>
<?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
@@ -218,7 +226,8 @@ unset($__errorArgs, $__bag); ?>
<div class="row gy-3">
<div class="col-xl-3">
<label class="form-label">تاریخ رفت (شروع)</label>
<input type="text" id="startDateInput" class="form-control" name="start_date" placeholder="تاریخ رفت را وارد کنید" value="<?php echo e(old('start_date')); ?>">
<input type="text" id="startDateInput" class="form-control" name="start_date"
placeholder="تاریخ رفت را وارد کنید" value="<?php echo e(old('start_date')); ?>">
<?php $__errorArgs = ['start_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
@@ -233,7 +242,8 @@ unset($__errorArgs, $__bag); ?>
<div class="col-xl-3">
<label class="form-label">تاریخ برگشت (پایان)</label>
<input type="text" id="endDateInput" class="form-control" name="end_date" placeholder="تاریخ برگشت را وارد کنید" value="<?php echo e(old('end_date')); ?>">
<input type="text" id="endDateInput" class="form-control" name="end_date"
placeholder="تاریخ برگشت را وارد کنید" value="<?php echo e(old('end_date')); ?>">
<?php $__errorArgs = ['end_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
@@ -248,7 +258,8 @@ unset($__errorArgs, $__bag); ?>
<div class="col-xl-3">
<label class="form-label">قیمت (تومان)</label>
<input type="text" class="form-control" name="price" placeholder="مثال: ۱۵۰۰۰۰۰۰" value="<?php echo e(old('price')); ?>">
<input type="text" class="form-control" name="price" placeholder="مثال: ۱۵۰۰۰۰۰۰"
value="<?php echo e(old('price')); ?>">
<?php $__errorArgs = ['price'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
@@ -263,7 +274,8 @@ unset($__errorArgs, $__bag); ?>
<div class="col-xl-3">
<label class="form-label">ظرفیت مسافر</label>
<input type="number" class="form-control" name="capacity" placeholder="مثال: ۳۰" value="<?php echo e(old('capacity')); ?>">
<input type="number" class="form-control" name="capacity" placeholder="مثال: ۳۰"
value="<?php echo e(old('capacity')); ?>">
<?php $__errorArgs = ['capacity'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
@@ -332,7 +344,7 @@ unset($__errorArgs, $__bag); ?>
</div>
<?php $__env->startPush('scripts'); ?>
<script>
$(document).ready(function() {
$(document).ready(function () {
$('#startDateInput').persianDatepicker({
format: 'YYYY/MM/DD HH:mm',