feat(admin): implement full flight management for panel admin
This commit is contained in:
@@ -360,128 +360,13 @@
|
||||
</div>
|
||||
<div class="flight-booking-detail">
|
||||
<div class="flight-booking-detail-header">
|
||||
<p>قابل استرداد جزئی</p>
|
||||
<a href="#flight-booking-collapse1" data-bs-toggle="collapse"
|
||||
role="button"
|
||||
aria-expanded="false" aria-controls="flight-booking-collapse1">
|
||||
اطلاعات پرواز <i class="far fa-angle-down"></i>
|
||||
|
||||
<a href="<?php echo e(route('flights.show' , $flight->id)); ?>" >
|
||||
مشاهده جزئیات<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="collapse" id="flight-booking-collapse1">
|
||||
<div class="flight-booking-detail-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-xl-6">
|
||||
<div class="flight-booking-detail-left">
|
||||
<ul class="nav nav-tabs" id="flTab1" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="fl-tab1"
|
||||
data-bs-toggle="tab"
|
||||
data-bs-target="#fl-tab-pane1"
|
||||
type="button"
|
||||
role="tab" aria-controls="fl-tab-pane1"
|
||||
aria-selected="true"><?php echo e($flight->origin_airport->city->name); ?>
|
||||
|
||||
- <?php echo e($flight->airport->city->name); ?>
|
||||
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" id="flTabContent1">
|
||||
<div class="tab-pane fade show active"
|
||||
id="fl-tab-pane1"
|
||||
role="tabpanel" aria-labelledby="fl-tab1"
|
||||
tabindex="0">
|
||||
<div class="flight-booking-detail-info">
|
||||
<div class="flight-booking-airline">
|
||||
<div class="flight-airline-img">
|
||||
<img
|
||||
src="assets/img/flight/airline-7.png"
|
||||
alt>
|
||||
</div>
|
||||
<div
|
||||
class="flight-airline-info flex-grow-1">
|
||||
<h5 class="flight-airline-name">شرکت
|
||||
هواپیمایی <?php echo e($flight->airline?->name); ?></h5>
|
||||
</div>
|
||||
<p class="flight-airline-class">
|
||||
باشه واسه بعد</p>
|
||||
</div>
|
||||
<div class="flight-booking-time">
|
||||
<div class="start-time">
|
||||
<div class="start-time-icon">
|
||||
<i class="fal fa-plane-departure"></i>
|
||||
</div>
|
||||
<div class="start-time-info">
|
||||
<h6 class="start-time-text">
|
||||
<?php echo e(\Hekmatinasser\Verta\Verta::instance($flight->departure_time)->format('H:i')); ?>
|
||||
|
||||
</h6>
|
||||
<p class="flight-full-date">
|
||||
<?php echo e(\Hekmatinasser\Verta\Verta::instance($flight->departure_time)->format('l, d F Y')); ?>
|
||||
|
||||
</p>
|
||||
<span
|
||||
class="flight-destination"><?php echo e($flight->origin_airport->city->name); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flight-stop">
|
||||
<div
|
||||
class="flight-stop-arrow"></div>
|
||||
</div>
|
||||
<div class="end-time">
|
||||
<div class="start-time-icon">
|
||||
<i class="fal fa-plane-arrival"></i>
|
||||
</div>
|
||||
<div class="start-time-info">
|
||||
<h6 class="end-time-text"></h6>
|
||||
<p class="flight-full-date">
|
||||
<?php echo e(\Hekmatinasser\Verta\Verta::instance($flight->arrival_time)->format('l, d F Y')); ?>
|
||||
|
||||
</p>
|
||||
<span
|
||||
class="flight-destination"><?php echo e($flight->airport->city->name); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 col-xl-6">
|
||||
<div class="flight-booking-detail-right">
|
||||
<div class="tab-content" id="frTabContent1">
|
||||
<div class="tab-pane fade show active"
|
||||
id="fr-tab-pane1"
|
||||
role="tabpanel" aria-labelledby="fr-tab1"
|
||||
tabindex="0">
|
||||
<div class="flight-booking-detail-info">
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<th>پرواز ها</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo e($flight->origin_airport->city->name); ?>
|
||||
|
||||
- <?php echo e($flight->airport->city->name); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flight-booking-detail-price">
|
||||
<h6 class="flight-booking-detail-price-title">مجموع
|
||||
(2
|
||||
مسافر)</h6>
|
||||
<div class="flight-detail-price-amount">
|
||||
10000 تومان
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
</div>
|
||||
<ul class="user-profile-sidebar-list">
|
||||
<li><a class="active" href="<?php echo e(route('accounts.profile')); ?>"><i class="far fa-user"></i> نمایه من</a></li>
|
||||
<li><a href="profile-booking.html"><i class="far fa-shopping-bag"></i> رزرو من</a></li>
|
||||
<li><a href="<?php echo e(route('accounts.favorites.index')); ?>"><i class="far fa-heart"></i> علاقه مندی های من</a></li>
|
||||
<li><a href="<?php echo e(route('accounts.comments')); ?>"><i class="fas fa-comments"></i> کامنتهای من</a></li>
|
||||
<li><a href="<?php echo e(route('accounts.edit-profile.index')); ?>"><i class="far fa-cog"></i> ویرایش حساب کاربری</a></li>
|
||||
|
||||
@@ -153,19 +153,19 @@ unset($__errorArgs, $__bag); ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
|
||||
<select class="form-control" name="flight_trip_type">
|
||||
<select class="form-control" name="trip_type">
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
|
||||
<?php $__currentLoopData = \App\Enums\Flight\FlightTripType::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tripType): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($tripType->value); ?>"
|
||||
<?php if(old('flight_trip_type') == $tripType->value): echo 'selected'; endif; ?>>
|
||||
<?php if(old('trip_type') == $tripType->value): echo 'selected'; endif; ?>>
|
||||
<?php echo e(method_exists($tripType, 'label') ? $tripType->label() : $tripType->name); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
|
||||
<?php $__errorArgs = ['flight_trip_type'];
|
||||
<?php $__errorArgs = ['trip_type'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
@@ -213,7 +213,7 @@ unset($__errorArgs, $__bag); ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
|
||||
<select class="form-control select2" id="origin_country_id">
|
||||
<select class="form-control select2" name="origin_country_id" id="origin_country_id">
|
||||
<option value="">کشور مبدأ را انتخاب کنید</option>
|
||||
|
||||
<?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
@@ -224,6 +224,16 @@ unset($__errorArgs, $__bag); ?>
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['origin_country_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6 country-wrapper">
|
||||
@@ -232,7 +242,7 @@ unset($__errorArgs, $__bag); ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
|
||||
<select class="form-control select2" id="destination_country_id">
|
||||
<select class="form-control select2" name="destination_country_id" id="destination_country_id">
|
||||
<option value="">کشور مقصد را انتخاب کنید</option>
|
||||
|
||||
<?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
@@ -243,6 +253,16 @@ unset($__errorArgs, $__bag); ?>
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['destination_country_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
@@ -251,10 +271,19 @@ unset($__errorArgs, $__bag); ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
|
||||
<select class="form-control select2"
|
||||
id="origin_city_id">
|
||||
<select class="form-control select2" name="origin_city_id" id="origin_city_id">
|
||||
<option value="">ابتدا کشور مبدأ را انتخاب کنید</option>
|
||||
</select>
|
||||
<?php $__errorArgs = ['origin_city_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
@@ -263,10 +292,19 @@ unset($__errorArgs, $__bag); ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
|
||||
<select class="form-control select2"
|
||||
id="destination_city_id">
|
||||
<select class="form-control select2" name="destination_city_id" id="destination_city_id">
|
||||
<option value="">ابتدا کشور مقصد را انتخاب کنید</option>
|
||||
</select>
|
||||
<?php $__errorArgs = ['destination_city_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
@@ -300,12 +338,12 @@ unset($__errorArgs, $__bag); ?>
|
||||
</label>
|
||||
|
||||
<select class="form-control select2"
|
||||
name="airport_id"
|
||||
id="airport_id">
|
||||
name="destination_airport_id"
|
||||
id="destination_airport_id">
|
||||
<option value="">ابتدا شهر مقصد را انتخاب کنید</option>
|
||||
</select>
|
||||
|
||||
<?php $__errorArgs = ['airport_id'];
|
||||
<?php $__errorArgs = ['destination_airport_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
@@ -495,7 +533,7 @@ unset($__errorArgs, $__bag); ?>
|
||||
const airportsRoute = '<?php echo e(route('admin.flights.airports-by-city', ['city' => '__CITY__'])); ?>';
|
||||
|
||||
const oldOriginAirportId = '<?php echo e(old('origin_airport_id')); ?>';
|
||||
const oldDestinationAirportId = '<?php echo e(old('airport_id')); ?>';
|
||||
const oldDestinationAirportId = '<?php echo e(old('destination_airport_id')); ?>';
|
||||
|
||||
const datePickerOptions = {
|
||||
format: 'YYYY/MM/DD HH:mm',
|
||||
@@ -611,7 +649,7 @@ unset($__errorArgs, $__bag); ?>
|
||||
resetSelect('#origin_city_id', 'ابتدا کشور مبدأ را انتخاب کنید');
|
||||
resetSelect('#destination_city_id', 'ابتدا کشور مقصد را انتخاب کنید');
|
||||
resetSelect('#origin_airport_id', 'ابتدا شهر مبدأ را انتخاب کنید');
|
||||
resetSelect('#airport_id', 'ابتدا شهر مقصد را انتخاب کنید');
|
||||
resetSelect('#destination_airport_id', 'ابتدا شهر مقصد را انتخاب کنید');
|
||||
}
|
||||
|
||||
function toggleScopeUI() {
|
||||
@@ -619,7 +657,7 @@ unset($__errorArgs, $__bag); ?>
|
||||
|
||||
resetLocations();
|
||||
|
||||
if (scope === '1') {
|
||||
if (scope === '0') {
|
||||
$('.country-wrapper').hide();
|
||||
|
||||
$('#origin_country_id').val(iranCountryId).trigger('change');
|
||||
@@ -628,7 +666,7 @@ unset($__errorArgs, $__bag); ?>
|
||||
return;
|
||||
}
|
||||
|
||||
if (scope === '2') {
|
||||
if (scope === '1') {
|
||||
$('.country-wrapper').show();
|
||||
|
||||
$('#origin_country_id').val('').trigger('change');
|
||||
@@ -657,7 +695,7 @@ unset($__errorArgs, $__bag); ?>
|
||||
$('#destination_country_id').on('change', function () {
|
||||
const countryId = $(this).val();
|
||||
|
||||
resetSelect('#airport_id', 'ابتدا شهر مقصد را انتخاب کنید');
|
||||
resetSelect('#destination_airport_id', 'ابتدا شهر مقصد را انتخاب کنید');
|
||||
|
||||
loadCities(
|
||||
countryId,
|
||||
@@ -678,7 +716,7 @@ unset($__errorArgs, $__bag); ?>
|
||||
$('#destination_city_id').on('change', function () {
|
||||
loadAirports(
|
||||
$(this).val(),
|
||||
'#airport_id',
|
||||
'#destination_airport_id',
|
||||
'فرودگاه مقصد را انتخاب کنید',
|
||||
oldDestinationAirportId
|
||||
);
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php $__env->startSection('title' , 'کامنت های من'); ?>
|
||||
|
||||
<?php $__env->startSection('account-content'); ?>
|
||||
<div class="user-profile-wrapper">
|
||||
|
||||
<?php if(session('success')): ?>
|
||||
<div class="col-lg-12 mb-3">
|
||||
<div class="alert alert-success">
|
||||
<?php echo e(session('success')); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(session('error')): ?>
|
||||
<div class="col-lg-12 mb-3">
|
||||
<div class="alert alert-danger">
|
||||
<?php echo e(session('error')); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="user-profile-card">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h4 class="user-profile-card-title mb-0">
|
||||
<i class="far fa-comments"></i>
|
||||
کامنتهای من
|
||||
</h4>
|
||||
|
||||
<span class="badge bg-primary">
|
||||
<?php echo e($comments->total()); ?> کامنت
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?php $__empty_1 = true; $__currentLoopData = $comments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $comment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<div class="border rounded p-3 mb-3">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<?php if($comment->tour): ?>
|
||||
<span class="badge bg-info px-3 py-2" style="font-size: 0.95rem;">
|
||||
<i class="fas fa-umbrella-beach me-1"></i>
|
||||
تور:
|
||||
<a href="<?php echo e(route('tours.show', $comment->tour->id)); ?>"
|
||||
class="text-white text-decoration-none fw-semibold">
|
||||
<?php echo e($comment->tour->title ?? ('تور شماره ' . $comment->tour->id)); ?>
|
||||
|
||||
</a>
|
||||
</span>
|
||||
<?php elseif($comment->flight): ?>
|
||||
<span class="badge bg-primary px-3 py-2" style="font-size: 0.95rem;">
|
||||
<i class="fas fa-plane-departure me-1"></i>
|
||||
پرواز:
|
||||
<a href="<?php echo e(route('flights.show', $comment->flight->id)); ?>"
|
||||
class="text-white text-decoration-none fw-semibold">
|
||||
<?php echo e($comment->flight->flight_number ?? ('پرواز شماره ' . $comment->flight->id)); ?>
|
||||
|
||||
</a>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<span class="badge bg-secondary px-3 py-2" style="font-size: 0.95rem;">
|
||||
عمومی
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<span class="text-muted">
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<?php echo e(\Hekmatinasser\Verta\Verta::instance($comment->created_at)->format('Y/m/d - H:i')); ?>
|
||||
|
||||
</span>
|
||||
|
||||
<?php if(isset($comment->status)): ?>
|
||||
<?php if($comment->status == \App\Enums\CommentStatus::PENDING): ?>
|
||||
<span class="badge bg-success"><?php echo e($comment->status->label()); ?></span>
|
||||
<?php elseif($comment->status == \App\Enums\CommentStatus::CONFIRMED): ?>
|
||||
<span class="badge bg-warning text-dark"><?php echo e($comment->status->label()); ?></span>
|
||||
<?php elseif($comment->status == \App\Enums\CommentStatus::REJECTED): ?>
|
||||
<span class="badge bg-danger"><?php echo e($comment->status->label()); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<p class="mb-0">
|
||||
<?php echo e($comment->content); ?>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<div class="text-center py-5">
|
||||
<i class="far fa-comment-dots fa-3x text-muted mb-3"></i>
|
||||
<h5>هنوز کامنتی ثبت نکردهاید.</h5>
|
||||
<p class="text-muted mb-0">
|
||||
بعد از ثبت نظر برای تورها یا پروازها، کامنتهایتان در این بخش نمایش داده میشوند.
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($comments->hasPages()): ?>
|
||||
<div class="mt-4 d-flex justify-content-center">
|
||||
<?php echo e($comments->links()); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('account.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/account/comments.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,562 @@
|
||||
<?php $__env->startSection('breadcrumb'); ?>
|
||||
<div>
|
||||
<h1 class="page-title fw-medium fs-18 mb-2">
|
||||
افزودن مدیر جدید
|
||||
</h1>
|
||||
|
||||
<div>
|
||||
<nav>
|
||||
<ol class="breadcrumb mb-0">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="<?php echo e(route('admin.admins.index')); ?>">
|
||||
مدیران
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
افزودن مدیر
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="container-fluid pt-4">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<?php if(session('success')): ?>
|
||||
<div class="alert alert-success">
|
||||
<?php echo e(session('success')); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<?php if(session('error')): ?>
|
||||
<div class="alert alert-danger">
|
||||
<?php echo e(session('error')); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="col-xl-12">
|
||||
|
||||
<form
|
||||
action="<?php echo e(route('admin.admins.store')); ?>"
|
||||
method="POST"
|
||||
enctype="multipart/form-data"
|
||||
>
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="card custom-card">
|
||||
|
||||
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
ایجاد مدیر
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row gy-3">
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">
|
||||
نام
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="first_name"
|
||||
value="<?php echo e(old('first_name')); ?>"
|
||||
placeholder="نام را وارد کنید"
|
||||
>
|
||||
|
||||
<?php $__errorArgs = ['first_name'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">
|
||||
نام خانوادگی
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="last_name"
|
||||
value="<?php echo e(old('last_name')); ?>"
|
||||
placeholder="نام خانوادگی را وارد کنید"
|
||||
>
|
||||
|
||||
<?php $__errorArgs = ['last_name'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">
|
||||
نام کاربری
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="username"
|
||||
value="<?php echo e(old('username')); ?>"
|
||||
placeholder="نام کاربری را وارد کنید"
|
||||
>
|
||||
|
||||
<?php $__errorArgs = ['username'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">
|
||||
ایمیل
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="email"
|
||||
class="form-control"
|
||||
name="email"
|
||||
value="<?php echo e(old('email')); ?>"
|
||||
placeholder="ایمیل را وارد کنید"
|
||||
>
|
||||
|
||||
<?php $__errorArgs = ['email'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">
|
||||
شماره موبایل
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="mobile"
|
||||
value="<?php echo e(old('mobile')); ?>"
|
||||
placeholder="شماره موبایل را وارد کنید"
|
||||
>
|
||||
|
||||
<?php $__errorArgs = ['mobile'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">
|
||||
رمز عبور
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="password"
|
||||
class="form-control"
|
||||
name="password"
|
||||
placeholder="رمز عبور را وارد کنید"
|
||||
>
|
||||
|
||||
<?php $__errorArgs = ['password'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">
|
||||
نقش مدیر
|
||||
</label>
|
||||
|
||||
<select
|
||||
class="form-control"
|
||||
name="role"
|
||||
id="adminRole"
|
||||
>
|
||||
<?php $__currentLoopData = \App\Enums\Admin\AdminRole::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option
|
||||
value="<?php echo e($role->value); ?>"
|
||||
<?php if(old('role') == $role->value): echo 'selected'; endif; ?>
|
||||
>
|
||||
<?php echo e($role->label()); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
|
||||
<?php $__errorArgs = ['role'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">
|
||||
وضعیت
|
||||
</label>
|
||||
|
||||
<select
|
||||
class="form-control"
|
||||
name="status"
|
||||
>
|
||||
|
||||
<?php $__currentLoopData = \App\Enums\Admin\AdminStatus::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<option
|
||||
value="<?php echo e($status->value); ?>"
|
||||
<?php if(
|
||||
old(
|
||||
'status',
|
||||
\App\Enums\Admin\AdminStatus::ACTIVE->value
|
||||
) == $status->value
|
||||
): echo 'selected'; endif; ?>
|
||||
>
|
||||
<?php echo e($status->label()); ?>
|
||||
|
||||
</option>
|
||||
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
</select>
|
||||
|
||||
<?php $__errorArgs = ['status'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-12 mt-4">
|
||||
|
||||
<div class="card custom-card">
|
||||
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
سطح دسترسی
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row gy-3">
|
||||
|
||||
<?php $__currentLoopData = \App\Enums\Admin\AdminPermission::cases(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
<div class="col-xl-3 col-lg-4 col-md-6">
|
||||
|
||||
<div class="form-check">
|
||||
|
||||
<input
|
||||
class="form-check-input permission-checkbox"
|
||||
type="checkbox"
|
||||
name="permissions[]"
|
||||
value="<?php echo e($permission->value); ?>"
|
||||
id="permission_<?php echo e($permission->value); ?>"
|
||||
data-permission="<?php echo e($permission->value); ?>"
|
||||
|
||||
<?php if(
|
||||
in_array(
|
||||
$permission->value,
|
||||
old('permissions', [])
|
||||
)
|
||||
): echo 'checked'; endif; ?>
|
||||
>
|
||||
|
||||
<label
|
||||
class="form-check-label"
|
||||
for="permission_<?php echo e($permission->value); ?>"
|
||||
>
|
||||
<?php echo e($permission->label()); ?>
|
||||
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php $__errorArgs = ['permissions'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
|
||||
<?php $__errorArgs = ['permissions.*'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-avatar mt-4">
|
||||
|
||||
<div class="text-center">
|
||||
|
||||
<label class="form-label d-block fw-semibold">
|
||||
تصویر پروفایل
|
||||
</label>
|
||||
|
||||
<label
|
||||
class="avatar-picker"
|
||||
id="avatarPreview"
|
||||
style="
|
||||
background-image:
|
||||
url('<?php echo e(asset('assets/admin/images/faces/DefaultAvatar.jpg')); ?>')
|
||||
"
|
||||
>
|
||||
|
||||
<input
|
||||
type="file"
|
||||
name="image"
|
||||
accept="image/*"
|
||||
onchange="previewAvatar(this)"
|
||||
>
|
||||
|
||||
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php $__errorArgs = ['image'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<div class="mt-2">
|
||||
<span class="text-danger">
|
||||
<?php echo e($message); ?>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-footer text-end">
|
||||
|
||||
<a
|
||||
href="<?php echo e(route('admin.admins.index')); ?>"
|
||||
class="btn btn-light"
|
||||
>
|
||||
انصراف
|
||||
</a>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
ثبت اطلاعات
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php $__env->startPush('scripts'); ?>
|
||||
<script>
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
const roleSelect = document.getElementById('adminRole');
|
||||
|
||||
const superAdminRole =
|
||||
<?php echo json_encode(\App\Enums\Admin\AdminRole::SUPERADMIN->value, 15, 512) ?>;
|
||||
|
||||
const manageAdminsPermission =
|
||||
<?php echo json_encode(\App\Enums\Admin\AdminPermission::MANAGE_ADMINS->value, 15, 512) ?>;
|
||||
|
||||
|
||||
function handleAdminPermissions() {
|
||||
|
||||
const isSuperAdmin =
|
||||
roleSelect.value === superAdminRole;
|
||||
|
||||
|
||||
document
|
||||
.querySelectorAll('.permission-checkbox')
|
||||
.forEach(function (checkbox) {
|
||||
|
||||
if (
|
||||
checkbox.dataset.permission ===
|
||||
manageAdminsPermission
|
||||
) {
|
||||
|
||||
if (!isSuperAdmin) {
|
||||
|
||||
checkbox.checked = false;
|
||||
checkbox.disabled = true;
|
||||
|
||||
} else {
|
||||
|
||||
checkbox.disabled = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
roleSelect.addEventListener(
|
||||
'change',
|
||||
handleAdminPermissions
|
||||
);
|
||||
|
||||
|
||||
handleAdminPermissions();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php $__env->stopPush(); ?>
|
||||
|
||||
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/admin/admins/create.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,434 @@
|
||||
<?php $__env->startSection('breadcrumb'); ?>
|
||||
<div>
|
||||
<div>
|
||||
<h1 class="page-title fw-medium fs-18 mb-2">ویرایش تور</h1>
|
||||
<div>
|
||||
<nav>
|
||||
<ol class="breadcrumb mb-0">
|
||||
<li class="breadcrumb-item"><a href="<?php echo e(route('admin.tours.index')); ?>">مدیریت تورها</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">ویرایش تور</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="container-fluid pt-4">
|
||||
|
||||
<?php if(session('success')): ?>
|
||||
<span style="color: green"><?php echo e(session('success')); ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(session('error')): ?>
|
||||
<span style="color: red"><?php echo e(session('error')); ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<form action="<?php echo e(route('admin.tours.update', $tour->id)); ?>" method="POST" enctype="multipart/form-data">
|
||||
<?php echo csrf_field(); ?>
|
||||
<?php echo method_field('PUT'); ?>
|
||||
|
||||
<div class="card custom-card">
|
||||
<div class="card-header">
|
||||
<div class="card-title">مشخصات اصلی تور</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body pt-0">
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">عنوان تور <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="title"
|
||||
value="<?php echo e(old('title', $tour->title)); ?>">
|
||||
<?php $__errorArgs = ['title'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">گستره تور <span class="text-danger">*</span></label>
|
||||
<select class="form-control" name="tour_scope" id="tourScopeSelect">
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
<?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', $tour->tour_scope?->value) == $scope->value ? 'selected' : ''); ?>>
|
||||
<?php echo e($scope->label()); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['tour_scope'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">نوع حمل و نقل / سفر <span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" name="tour_mode">
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
<?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', $tour->tour_mode?->value) == $mode->value ? 'selected' : ''); ?>>
|
||||
<?php echo e($mode->label()); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['tour_mode'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">سبک تور <span class="text-danger">*</span></label>
|
||||
<select class="form-control" name="tour_type">
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
<?php $__currentLoopData = \App\Enums\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', $tour->tour_type?->value) == $type->value ? 'selected' : ''); ?>>
|
||||
<?php echo e($type->label()); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['tour_type'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">شهر مبدا <span class="text-danger">*</span></label>
|
||||
<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', $tour->origin_city_id) == $city->id ? 'selected' : ''); ?>>
|
||||
<?php echo e($city->name); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['origin_city_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6" id="countryWrapper"
|
||||
style="<?php echo e($tour->tour_scope === \App\Enums\Tour\TourScope::INTERNATIONAL ? '' : 'display:none;'); ?>">
|
||||
<label class="form-label">کشور مقصد</label>
|
||||
<select class="form-control" id="country_id"
|
||||
<?php echo e($tour->tour_scope === \App\Enums\Tour\TourScope::INTERNATIONAL ? '' : 'disabled'); ?>>
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
<?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($country->id); ?>"
|
||||
<?php echo e($selectedCountryId == $country->id ? 'selected' : ''); ?>>
|
||||
<?php echo e($country->name); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">شهر مقصد <span class="text-danger">*</span></label>
|
||||
<select class="form-control select2" name="destination_city_id">
|
||||
<option value="">شهر مقصد را انتخاب کنید</option>
|
||||
<?php $__currentLoopData = $destinationCities; $__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', $tour->destination_city_id) == $city->id ? 'selected' : ''); ?>>
|
||||
<?php echo e($city->name); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['destination_city_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">خلاصه تور</label>
|
||||
<textarea class="form-control" name="summary"
|
||||
rows="2"><?php echo e(old('summary', $tour->summary)); ?></textarea>
|
||||
<?php $__errorArgs = ['summary'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-12">
|
||||
<label class="form-label">توضیحات کامل و برنامه سفر</label>
|
||||
<textarea class="form-control" name="description"
|
||||
rows="5"><?php echo e(old('description', $tour->description)); ?></textarea>
|
||||
<?php $__errorArgs = ['description'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4">
|
||||
<h6 class="fw-bold mb-3">اطلاعات ظرفیت / زمانبندی حرکت</h6>
|
||||
<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"
|
||||
value="<?php echo e(old(
|
||||
'start_date',$departure?->start_date ? Verta::instance($departure->start_date)->format('Y/m/d H:i') : '' )); ?>">
|
||||
<?php $__errorArgs = ['start_date'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-3">
|
||||
<label class="form-label">تاریخ برگشت (پایان)</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
id="endDateInput"
|
||||
class="form-control"
|
||||
name="end_date"
|
||||
value="<?php echo e(old('end_date',$departure?->end_date ? Verta::instance($departure->end_date)->format('Y/m/d H:i') : '')); ?>">
|
||||
<?php $__errorArgs = ['end_date'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-3">
|
||||
<label class="form-label">قیمت (تومان)</label>
|
||||
<input type="text" class="form-control" name="price"
|
||||
value="<?php echo e(old('price', $departure?->price)); ?>">
|
||||
<?php $__errorArgs = ['price'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-3">
|
||||
<label class="form-label">ظرفیت مسافر</label>
|
||||
<input type="number" class="form-control" name="capacity"
|
||||
value="<?php echo e(old('capacity', $departure?->capacity)); ?>">
|
||||
<?php $__errorArgs = ['capacity'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4">
|
||||
<h6 class="fw-bold mb-2">گالری تصاویر فعلی</h6>
|
||||
<div class="d-flex flex-wrap gap-2 mb-3">
|
||||
<?php $__empty_1 = true; $__currentLoopData = $tour->images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<div class="position-relative" style="width:120px;height:120px;">
|
||||
<img src="<?php echo e(getFileUrl($image->file_id)); ?>"
|
||||
class="w-100 h-100 rounded"
|
||||
style="object-fit:cover;"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php if($image->is_default): ?>
|
||||
<span
|
||||
class="badge bg-primary position-absolute top-0 start-0 m-1">اصلی</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<span class="text-muted">هیچ تصویری ثبت نشده است.</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<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;">
|
||||
<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;">
|
||||
<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">
|
||||
</div>
|
||||
<?php $__errorArgs = ['images'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small d-block"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<button type="submit" class="btn btn-primary">ذخیره تغییرات</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $__env->startPush('scripts'); ?>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#startDateInput').persianDatepicker({
|
||||
format: 'YYYY/MM/DD HH:mm',
|
||||
timePicker: {
|
||||
enabled: true,
|
||||
meridiem: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
autoClose: false,
|
||||
initialValue: false,
|
||||
initialValueType: 'persian',
|
||||
toolbox: {
|
||||
calendarSwitch: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#endDateInput').persianDatepicker({
|
||||
format: 'YYYY/MM/DD HH:mm',
|
||||
timePicker: {
|
||||
enabled: true,
|
||||
meridiem: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
autoClose: false,
|
||||
initialValue: false,
|
||||
initialValueType: 'persian',
|
||||
toolbox: {
|
||||
calendarSwitch: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function toggleScopeUI() {
|
||||
const scope = $('#tourScopeSelect').val();
|
||||
|
||||
if (scope === '1') {
|
||||
$('#countryWrapper').show();
|
||||
$('#country_id').prop('disabled', false);
|
||||
} else {
|
||||
$('#countryWrapper').hide();
|
||||
$('#country_id').prop('disabled', true).val('');
|
||||
}
|
||||
}
|
||||
|
||||
$('#tourScopeSelect').on('change', toggleScopeUI);
|
||||
|
||||
$('#country_id').on('change', function () {
|
||||
const countryId = $(this).val();
|
||||
|
||||
if (!countryId) return;
|
||||
|
||||
$.get(`/admin/tours/cities-by-country/${countryId}`, function (cities) {
|
||||
let options = '<option value="">شهر را انتخاب کنید</option>';
|
||||
cities.forEach(function (city) {
|
||||
options += `<option value="${city.id}">${city.name}</option>`;
|
||||
});
|
||||
|
||||
$('select[name="destination_city_id"]').html(options).trigger('change');
|
||||
}).fail(function () {
|
||||
alert('خطا در دریافت لیست شهرهای این کشور');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php $__env->stopPush(); ?>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/admin/tours/edit.blade.php ENDPATH**/ ?>
|
||||
@@ -1,8 +1,15 @@
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<div class="activity-item wow fadeInUp" data-wow-duration="1s" data-wow-delay=".25s">
|
||||
<div class="activity-img">
|
||||
<img src="<?php echo e($flight->file?->url ?? asset('assets/img/activity/01.jpg')); ?>"
|
||||
alt="<?php echo e($flight->flight_number); ?>">
|
||||
<?php if($flight->coverImage?->file_id): ?>
|
||||
<img src="<?php echo e(getFileUrl($flight->coverImage->file_id)); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($flight->flight_number); ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo e(asset('assets/img/account/user.jpg')); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($flight->title); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if(auth()->guard()->check()): ?>
|
||||
<form action="<?php echo e(route('accounts.favorites.flight.toggle', ['flight' => $flight->id])); ?>"
|
||||
method="POST"
|
||||
|
||||
@@ -241,12 +241,9 @@
|
||||
<div class="tour-content">
|
||||
<div class="tour-top">
|
||||
<a href="#" class="tour-category"><i
|
||||
class="far fa-tag"></i> <?php echo e($tour->tour_type); ?></a>
|
||||
class="far fa-tag"></i> <?php echo e($tour->tour_type->label()); ?></a>
|
||||
</div>
|
||||
<h4 class="tour-title"><a href="#"><?php echo e($tour->title); ?></a></h4>
|
||||
<div class="tour-duration"><i class="far fa-clock"></i>
|
||||
سفر <?php echo e(tourDuration($tour)); ?></div>
|
||||
<div class="tour-date"><?php echo e(tourDateRange($tour)); ?></div>
|
||||
<div class="tour-bottom">
|
||||
<div class="tour-price">
|
||||
<span><?php echo e(number_format($tour->tourDepartures->first()->price)); ?> تومان</span>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php $__env->startSection('title', __('Forbidden')); ?>
|
||||
<?php $__env->startSection('code', '403'); ?>
|
||||
<?php $__env->startSection('message', __($exception->getMessage() ?: 'Forbidden')); ?>
|
||||
|
||||
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions/views/403.blade.php ENDPATH**/ ?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
<div class="listing-price">
|
||||
<h4 class="listing-price-tag">پرواز</h4>
|
||||
<div class="listing-price-amount">
|
||||
<span> <?php echo e(number_format($flight->price)); ?> تومان</span>
|
||||
<span> <?php echo e(number_format($flight->price)); ?> تومان</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-form">
|
||||
@@ -15,14 +15,14 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<div class="search-form-date">
|
||||
<label for="departure_date">تاریخ رفت</label>
|
||||
<input
|
||||
type="text"
|
||||
id="departure_date"
|
||||
class="form-control"
|
||||
value="<?php echo e(verta($flight->departure_time)->format('Y/m/d - H:i')); ?>"
|
||||
disabled
|
||||
>
|
||||
<label for="departure_date">تاریخ رفت</label>
|
||||
<input
|
||||
type="text"
|
||||
id="departure_date"
|
||||
class="form-control"
|
||||
value="<?php echo e(verta($flight->departure_time)->format('Y/m/d - H:i')); ?>"
|
||||
disabled
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,21 +30,22 @@
|
||||
<div class="form-group">
|
||||
<div class="search-form-date">
|
||||
<div class="search-form-return">
|
||||
<label for="return_date">تاریخ برگشت</label>
|
||||
<input
|
||||
type="text"
|
||||
id="return_date"
|
||||
class="form-control"
|
||||
value="<?php echo e($flight->arrival_time); ?>"
|
||||
disabled
|
||||
>
|
||||
<label for="return_date">تاریخ برگشت</label>
|
||||
<input
|
||||
type="text"
|
||||
id="return_date"
|
||||
class="form-control"
|
||||
value="<?php echo e($flight->arrival_time); ?>"
|
||||
disabled
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listing-side-btn">
|
||||
<button type="submit" class="theme-btn"><span class="far fa-shopping-bag"></span>اکنون ثبت کن</button>
|
||||
<button type="submit" class="theme-btn"><span class="far fa-shopping-bag"></span>اکنون ثبت کن
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
<?php $__env->startSection('breadcrumb'); ?>
|
||||
<div>
|
||||
<div>
|
||||
<h1 class="page-title fw-medium fs-18 mb-2">سطل زباله پروازها</h1>
|
||||
|
||||
<div>
|
||||
<nav>
|
||||
<ol class="breadcrumb mb-0">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="javascript:void(0);">پروازها</a>
|
||||
</li>
|
||||
|
||||
<li class="breadcrumb-item">
|
||||
<a href="<?php echo e(route('admin.flights.index')); ?>">
|
||||
لیست پروازها
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
سطل زباله پروازها
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="container-fluid pt-4">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card custom-card">
|
||||
<div class="card-body p-3">
|
||||
<div class="d-flex align-items-center justify-content-between flex-wrap gap-3">
|
||||
|
||||
<div>
|
||||
<h6 class="mb-0 fw-semibold">
|
||||
پروازهای حذفشده
|
||||
</h6>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<a href="<?php echo e(route('admin.flights.index')); ?>"
|
||||
class="btn btn-primary me-2">
|
||||
<i class="ri-arrow-go-back-line me-1 fw-medium align-middle"></i>
|
||||
بازگشت به لیست پروازها
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card custom-card">
|
||||
<div class="table-responsive">
|
||||
<table class="table text-nowrap table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>تصویر</th>
|
||||
<th>شماره پرواز</th>
|
||||
<th>ایرلاین</th>
|
||||
<th>فرودگاه مبدأ</th>
|
||||
<th>فرودگاه مقصد</th>
|
||||
<th>نوع پرواز</th>
|
||||
<th>محدوده</th>
|
||||
<th>وضعیت</th>
|
||||
<th>تاریخ ایجاد</th>
|
||||
<th>تاریخ حذف</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if(session('success')): ?>
|
||||
<tr>
|
||||
<td colspan="11">
|
||||
<span style="color: green">
|
||||
<?php echo e(session('success')); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(session('error')): ?>
|
||||
<tr>
|
||||
<td colspan="11">
|
||||
<span style="color: red">
|
||||
<?php echo e(session('error')); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($errors->any()): ?>
|
||||
<tr>
|
||||
<td colspan="11">
|
||||
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<span class="d-block" style="color: red">
|
||||
<?php echo e($error); ?>
|
||||
|
||||
</span>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $__empty_1 = true; $__currentLoopData = $flights; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $flight): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="avatar avatar-md avatar-square bg-light">
|
||||
<?php if($flight->coverImage?->file): ?>
|
||||
<img src="<?php echo e(getFileUrl($flight->coverImage->file_id)); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($flight->flight_number); ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo e(asset('assets/admin/images/faces/DefaultAvatar.jpg')); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($flight->flight_number); ?>">
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="fw-medium">
|
||||
<?php echo e($flight->flight_number ?? '-'); ?>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($flight->airline?->name ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div>
|
||||
<?php echo e($flight->origin_airport?->name ?? '-'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<small class="text-muted">
|
||||
<?php echo e($flight->origin_airport?->city?->name ?? '-'); ?>
|
||||
|
||||
</small>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div>
|
||||
<?php echo e($flight->airport?->name ?? '-'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<small class="text-muted">
|
||||
<?php echo e($flight->airport?->city?->name ?? '-'); ?>
|
||||
|
||||
</small>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if($flight->flight_type): ?>
|
||||
<span class="badge bg-success-transparent">
|
||||
<?php echo e($flight->flight_type->label()); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if($flight->flight_scope): ?>
|
||||
<span class="badge bg-primary-transparent">
|
||||
<?php echo e($flight->flight_scope->label()); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if($flight->status): ?>
|
||||
<span class="badge bg-warning-transparent">
|
||||
<?php echo e($flight->status->label()); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($flight->created_at?->toJalali()->format('H:i Y/m/d') ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($flight->deleted_at?->toJalali()->format('H:i Y/m/d') ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="hstack gap-2 fs-15">
|
||||
|
||||
<form action="<?php echo e(route('admin.flights.trash.restore', $flight->id)); ?>"
|
||||
method="POST">
|
||||
<?php echo csrf_field(); ?>
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-icon btn-sm btn-success-light"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="بازگردانی پرواز">
|
||||
<i class="ri-arrow-go-back-line"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form action="<?php echo e(route('admin.flights.trash.forceDelete', $flight->id)); ?>"
|
||||
method="POST"
|
||||
onsubmit="return confirm('آیا از حذف دائمی این پرواز مطمئن هستید؟ این عملیات قابل بازگشت نیست.')">
|
||||
<?php echo csrf_field(); ?>
|
||||
<?php echo method_field('DELETE'); ?>
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-icon btn-sm btn-danger-light"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="حذف دائمی پرواز">
|
||||
<i class="ri-delete-bin-6-line"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||
<tr>
|
||||
<td colspan="11" class="text-center text-muted py-4">
|
||||
پروازی در سطل زباله وجود ندارد.
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="card-footer d-flex justify-content-center align-items-center">
|
||||
<?php echo e($flights->links()); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/admin/flights/trash.blade.php ENDPATH**/ ?>
|
||||
@@ -0,0 +1,426 @@
|
||||
<?php $__env->startSection('breadcrumb'); ?>
|
||||
<div>
|
||||
<div>
|
||||
<h1 class="page-title fw-medium fs-18 mb-2">ایجاد تور جدید</h1>
|
||||
<div>
|
||||
<nav>
|
||||
<ol class="breadcrumb mb-0">
|
||||
<li class="breadcrumb-item"><a href="javascript:void(0);">مدیریت تورها</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">ایجاد تور</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<div class="container-fluid pt-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<form action="<?php echo e(route('admin.tours.store')); ?>" method="POST" enctype="multipart/form-data">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="card custom-card">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
مشخصات اصلی تور
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body pt-0">
|
||||
<div class="row gy-3">
|
||||
|
||||
<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="<?php echo e(old('title')); ?>"
|
||||
/>
|
||||
<?php $__errorArgs = ['title'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">گستره تور <span class="text-danger">*</span></label>
|
||||
<select class="form-control" name="tour_scope">
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
<?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>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['tour_scope'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6" id="countryWrapper" style="display:none;">
|
||||
<label class="form-label">کشور مقصد <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="country_id" disabled>
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
<?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($country->id); ?>"><?php echo e($country->name); ?></option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">نوع حمل و نقل / سفر <span
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" name="tour_mode">
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
<?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>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['tour_mode'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">سبک تور <span class="text-danger">*</span></label>
|
||||
<select class="form-control" name="tour_type">
|
||||
<option value="">یک مورد را انتخاب کنید</option>
|
||||
<?php $__currentLoopData = \App\Enums\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 echo e(method_exists($type, 'label') ? $type->label() : $type->name); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['tour_type'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">شهر مبدا <span class="text-danger">*</span></label>
|
||||
<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' : ''); ?>>
|
||||
<?php echo e($city->name); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['origin_city_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">شهر مقصد <span class="text-danger">*</span></label>
|
||||
<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' : ''); ?>>
|
||||
<?php echo e($city->name); ?>
|
||||
|
||||
</option>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</select>
|
||||
<?php $__errorArgs = ['destination_city_id'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<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>
|
||||
<?php $__errorArgs = ['summary'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<?php $__errorArgs = ['description'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<hr class="my-4">
|
||||
<h6 class="fw-bold mb-3">اطلاعات اولین ظرفیت / زمانبندی حرکت</h6>
|
||||
<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')); ?>">
|
||||
<?php $__errorArgs = ['start_date'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<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')); ?>">
|
||||
<?php $__errorArgs = ['end_date'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<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')); ?>">
|
||||
<?php $__errorArgs = ['price'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<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')); ?>">
|
||||
<?php $__errorArgs = ['capacity'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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;"
|
||||
>
|
||||
<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;"
|
||||
>
|
||||
<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"
|
||||
/>
|
||||
</div>
|
||||
<?php $__errorArgs = ['images'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span class="text-danger small d-block"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
<?php if($errors->has('images.*')): ?>
|
||||
<?php $__currentLoopData = $errors->get('images.*'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $messages): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php $__currentLoopData = $messages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<span class="text-danger small d-block"><?php echo e($message); ?></span>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<button type="submit" class="btn btn-primary">ثبت و ایجاد تور</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $__env->startPush('scripts'); ?>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#startDateInput').persianDatepicker({
|
||||
format: 'YYYY/MM/DD HH:mm',
|
||||
timePicker: {
|
||||
enabled: true,
|
||||
meridiem: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
autoClose: false,
|
||||
initialValue: false,
|
||||
minDate: new persianDate().valueOf(),
|
||||
toolbox: {
|
||||
calendarSwitch: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#endDateInput').persianDatepicker({
|
||||
format: 'YYYY/MM/DD HH:mm',
|
||||
timePicker: {
|
||||
enabled: true,
|
||||
meridiem: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
autoClose: false,
|
||||
initialValue: false,
|
||||
minDate: new persianDate().valueOf(),
|
||||
toolbox: {
|
||||
calendarSwitch: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const originalDestHtml = $('select[name="destination_city_id"]').html();
|
||||
|
||||
function toggleScopeUI() {
|
||||
const scope = $('select[name="tour_scope"]').val();
|
||||
|
||||
if (scope === '1') {
|
||||
$('#countryWrapper').show();
|
||||
$('#country_id').prop('disabled', false);
|
||||
} else {
|
||||
$('#countryWrapper').hide();
|
||||
$('#country_id').prop('disabled', true).val('');
|
||||
|
||||
$('select[name="destination_city_id"]').html(originalDestHtml).trigger('change');
|
||||
}
|
||||
}
|
||||
|
||||
$('select[name="tour_scope"]').on('change', toggleScopeUI);
|
||||
toggleScopeUI();
|
||||
|
||||
$('#country_id').on('change', function () {
|
||||
const countryId = $(this).val();
|
||||
|
||||
if (!countryId) return;
|
||||
|
||||
$.get(`/admin/tours/cities-by-country/${countryId}`, function (cities) {
|
||||
let options = '<option value="">شهر را انتخاب کنید</option>';
|
||||
cities.forEach(function (city) {
|
||||
options += `<option value="${city.id}">${city.name}</option>`;
|
||||
});
|
||||
|
||||
$('select[name="destination_city_id"]').html(options).trigger('change');
|
||||
}).fail(function () {
|
||||
alert('خطا در دریافت لیست شهرهای این کشور');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php $__env->stopPush(); ?>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/admin/tours/create.blade.php ENDPATH**/ ?>
|
||||
Reference in New Issue
Block a user