feat: add site visit tracking middleware and admin dashboard stats
This commit is contained in:
@@ -2,14 +2,13 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Enums\OrderStatus;
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Flight;
|
||||
use App\Models\Order;
|
||||
use App\Models\Product;
|
||||
use App\Models\ProductCategory;
|
||||
use App\Models\Tour;
|
||||
use App\Models\User;
|
||||
use App\Models\DailySiteView;
|
||||
use Carbon\Carbon;
|
||||
use Carbon\CarbonPeriod;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -22,6 +21,31 @@ class DashboardController extends Controller
|
||||
$title = 'داشبورد';
|
||||
$tourCount = Tour::count();
|
||||
$flightCount = Flight::count();
|
||||
$siteTotalViews = Cache::get('site_total_views', 0);
|
||||
|
||||
$days = collect(range(9, 0))
|
||||
->map(fn($day) => now()->subDays($day)->startOfDay());
|
||||
|
||||
|
||||
$dailyViews = DailySiteView::query()
|
||||
->whereBetween('view_date', [
|
||||
$days->first()->toDateString(),
|
||||
$days->last()->toDateString(),
|
||||
])
|
||||
->get()
|
||||
->keyBy(fn($item) => $item->view_date->toDateString());
|
||||
|
||||
$chartLabels = $days->map(
|
||||
fn($date) => $date->format('m/d')
|
||||
)->values();
|
||||
|
||||
|
||||
$siteViewsData = $days->map(
|
||||
fn($date) => $dailyViews[$date->toDateString()]->views_count ?? 0
|
||||
)->values();
|
||||
|
||||
|
||||
$siteTotalViews = DailySiteView::sum('views_count');
|
||||
|
||||
$userCount = User::count();
|
||||
|
||||
@@ -29,7 +53,10 @@ class DashboardController extends Controller
|
||||
'title',
|
||||
'tourCount',
|
||||
'flightCount',
|
||||
'userCount'
|
||||
'userCount',
|
||||
'siteTotalViews',
|
||||
'chartLabels',
|
||||
'siteViewsData',
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
|
||||
use App\Models\DailySiteView;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class CountSiteViews
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param Closure(Request): (Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
|
||||
$isPublicPage = $request->isMethod('GET')
|
||||
&& !$request->is('admin')
|
||||
&& !$request->is('admin/*')
|
||||
&& !$request->is('api/*')
|
||||
&& !$request->ajax();
|
||||
|
||||
if ($isPublicPage) {
|
||||
$dailyView = DailySiteView::firstOrCreate(
|
||||
['view_date' => today()->toDateString()],
|
||||
['views_count' => 0],
|
||||
);
|
||||
|
||||
$dailyView->increment('views_count');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin\Flight;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FlightStoreRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class DailySiteView
|
||||
*
|
||||
* @property int $id
|
||||
* @property Carbon $view_date
|
||||
* @property int $views_count
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class DailySiteView extends Model
|
||||
{
|
||||
protected $table = 'daily_site_views';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'view_date' => 'datetime',
|
||||
'views_count' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'view_date',
|
||||
'views_count'
|
||||
];
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Middleware\CountSiteViews;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
@@ -15,6 +16,10 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
$middleware->web(append: [
|
||||
CountSiteViews::class,
|
||||
]);
|
||||
|
||||
$middleware->redirectGuestsTo(function (Illuminate\Http\Request $request) {
|
||||
return $request->is('admin') || $request->is('admin/*')
|
||||
? route('admin.auth.login.index')
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
<div class="flex-fill fw-medium fs-13 mb-1 text-dark">آمار بازدید سایت</div>
|
||||
<div
|
||||
class="fs-22 fw-semibold mb-1 text-pink">
|
||||
5
|
||||
{{ number_format($siteTotalViews) }}
|
||||
</div>
|
||||
<div class="d-flex align-items-center fs-11">
|
||||
<span class="text-default op-6">تا این لحظه </span>
|
||||
@@ -200,3 +200,67 @@
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const chartElement = document.querySelector('#ordersChart');
|
||||
|
||||
if (!chartElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
const options = {
|
||||
series: [{
|
||||
name: 'بازدید سایت',
|
||||
data: @json($siteViewsData),
|
||||
}],
|
||||
chart: {
|
||||
type: 'bar',
|
||||
height: 360,
|
||||
toolbar: {
|
||||
show: false
|
||||
},
|
||||
fontFamily: 'IRANSans, sans-serif'
|
||||
},
|
||||
colors: ['#e75480'],
|
||||
plotOptions: {
|
||||
bar: {
|
||||
horizontal: false,
|
||||
columnWidth: '45%',
|
||||
borderRadius: 5,
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false
|
||||
},
|
||||
xaxis: {
|
||||
categories: @json($chartLabels),
|
||||
title: {
|
||||
text: '۱۰ روز اخیر'
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
min: 0,
|
||||
forceNiceScale: true,
|
||||
title: {
|
||||
text: 'تعداد بازدید'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
borderColor: '#e9edf4',
|
||||
strokeDashArray: 3
|
||||
},
|
||||
tooltip: {
|
||||
y: {
|
||||
formatter: function (value) {
|
||||
return value.toLocaleString('fa-IR') + ' بازدید';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
new ApexCharts(chartElement, options).render();
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
@@ -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="{{ $tour?->file_id ?? asset('assets/img/activity/01.jpg') }}"
|
||||
alt="{{ $tour->title }}">
|
||||
@if($tour->coverImage?->file)
|
||||
<img src="{{ getFileUrl($tour->coverImage->file_id) }}"
|
||||
class="w-100 h-100"
|
||||
alt="{{ $tour->title }}">
|
||||
@else
|
||||
<img src="{{ asset('assets/Admin/images/tour/single-2.jpg') }}"
|
||||
class="w-100 h-100"
|
||||
alt="{{ $tour->title }}">
|
||||
@endif
|
||||
@auth
|
||||
<form action="{{ route('accounts.favorites.tour.toggle', ['tour' => $tour->id]) }}"
|
||||
method="POST"
|
||||
|
||||
@@ -229,7 +229,15 @@
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="tour-item">
|
||||
<div class="tour-img">
|
||||
<img src="assets/img/tour/01.jpg" alt>
|
||||
@if($tour->coverImage?->file)
|
||||
<img src="{{ getFileUrl($tour->coverImage->file_id) }}"
|
||||
class="w-100 h-100"
|
||||
alt="{{ $tour->title }}">
|
||||
@else
|
||||
<img src="{{ asset('assets/Admin/images/tour/single-2.jpg') }}"
|
||||
class="w-100 h-100"
|
||||
alt="{{ $tour->title }}">
|
||||
@endif
|
||||
<a href="#" class="add-wishlist"><i class="far fa-heart"></i></a>
|
||||
</div>
|
||||
<div class="tour-content">
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
<div class="listing-content">
|
||||
<div class="listing-slider owl-carousel owl-theme" dir="ltr">
|
||||
@if ($tour->images && $tour->images->count() > 0)
|
||||
@if ($tour->images->count() > 1)
|
||||
@foreach ($tour->images as $image)
|
||||
<img src="{{ asset($image->path) }}" alt="{{ $tour->title }}">
|
||||
@endforeach
|
||||
@else
|
||||
<img src="{{ asset($tour->images->first()->path) }}" alt="{{ $tour->title }}">
|
||||
@endif
|
||||
@if($tour->coverImage?->file)
|
||||
<img src="{{ getFileUrl($tour->coverImage->file_id) }}"
|
||||
class="w-100 h-100"
|
||||
alt="{{ $tour->title }}">
|
||||
@else
|
||||
<img src="{{ asset('assets/img/flight/single-1.jpg') }}" alt="{{ $tour->title}}">
|
||||
<img src="{{ asset('assets/Admin/images/tour/single-2.jpg') }}"
|
||||
class="w-100 h-100"
|
||||
alt="{{ $tour->title }}">
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="listing-header">
|
||||
<div class="listing-header-info">
|
||||
<h4 class="listing-title">{{ $tour->originCity?->name }} - {{ $tour->city?->name }}</h4>
|
||||
<p class="listing-stop"> سفر {{ $tour->tour_type }}</p>
|
||||
<p class="listing-stop"> سفر {{ $tour->tour_type->label() ?? 'نامشخص'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -60,7 +58,7 @@
|
||||
</div>
|
||||
<div class="listing-feature-content">
|
||||
<h6>نوع تور</h6>
|
||||
<span>{{ $tour->tour_type ?? 'نامشخص' }}</span>
|
||||
<span>{{ $tour->tour_type?->label() ?? 'نامشخص' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
|
||||
<div class="search-form">
|
||||
<form action="#">
|
||||
<form action="{{route('tours.show' , $tour->id)}}">
|
||||
@csrf
|
||||
<input type="hidden" name="tour_id" value="{{ $tour->id }}">
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<div class="search-form-date">
|
||||
<label for="departure_date">تاریخ رفت</label>
|
||||
<div class="search-form-return">
|
||||
<label for="departure_date">زمان رفت</label>
|
||||
<input
|
||||
type="text"
|
||||
id="departure_date"
|
||||
@@ -56,6 +57,7 @@
|
||||
<span class="far fa-shopping-bag"></span>
|
||||
اکنون ثبت کن
|
||||
</button>
|
||||
|
||||
<a href="#" class="border-btn">
|
||||
<i class="far fa-heart"></i>
|
||||
افزودن به علاقه مندی ها
|
||||
|
||||
@@ -1,515 +0,0 @@
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<main class="main">
|
||||
|
||||
<div class="site-breadcrumb" style="background: url(assets/img/breadcrumb/01.jpg)">
|
||||
<div class="container">
|
||||
<h2 class="breadcrumb-title">پرواز با عرض کامل</h2>
|
||||
<ul class="breadcrumb-menu">
|
||||
<li><a href="<?php echo e(route('index')); ?>">صفحه اصلی</a></li>
|
||||
<li class="active">پرواز با عرض کامل</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-area">
|
||||
<div class="container">
|
||||
<div class="search-wrapper">
|
||||
|
||||
<div class="search-box flight-search">
|
||||
<div class="search-form">
|
||||
<form action="<?php echo e(route('flights.index')); ?>" method="GET">
|
||||
|
||||
<div class="flight-type">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" checked value="one-way"
|
||||
name="flight-type" id="flight-type1">
|
||||
<label class="form-check-label" for="flight-type1">
|
||||
یک طرفه
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" value="round-way"
|
||||
name="flight-type" id="flight-type2">
|
||||
<label class="form-check-label" for="flight-type2">
|
||||
راه دور
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" value="multi-city"
|
||||
name="flight-type" id="flight-type3">
|
||||
<label class="form-check-label" for="flight-type3">
|
||||
چند شهر
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flight-search-wrapper">
|
||||
<div class="flight-search-content">
|
||||
|
||||
<div class="flight-search-item">
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label>از</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="text" name="from-destination"
|
||||
class="form-control swap-from" value="مشهد">
|
||||
<i class="fal fa-plane-departure"></i>
|
||||
</div>
|
||||
<p>فرودگاه بین المللی مشهد
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="search-form-swap"><i class="far fa-repeat"></i>
|
||||
</div>
|
||||
<label>به</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="text" name="to-destination"
|
||||
class="form-control swap-to" value="تهران">
|
||||
<i class="fal fa-plane-arrival"></i>
|
||||
</div>
|
||||
<p>فرودگاه بین المللی تهران</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="search-form-date">
|
||||
<div class="search-form-journey">
|
||||
<label>تاریخ سفر</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="text" name="journey-date"
|
||||
class="form-control date-picker journey-date">
|
||||
<i class="fal fa-calendar-days"></i>
|
||||
</div>
|
||||
<p class="journey-day-name"></p>
|
||||
</div>
|
||||
<div class="search-form-return">
|
||||
<label>تاریخ برگشت</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="text" name="return-date"
|
||||
class="form-control date-picker return-date">
|
||||
</div>
|
||||
<p class="return-day-name"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group dropdown static-dropdown passenger-box">
|
||||
<div class="passenger-class" role="menu"
|
||||
data-bs-toggle="dropdown" data-bs-display="static"
|
||||
aria-expanded="false">
|
||||
<label>مسافر، کلاس</label>
|
||||
<div class="form-group-icon">
|
||||
<div class="passenger-total"><span
|
||||
class="passenger-total-amount">2</span>
|
||||
مسافر
|
||||
</div>
|
||||
<i class="fal fa-user-plus"></i>
|
||||
</div>
|
||||
<p class="passenger-class-name">بیزنس</p>
|
||||
</div>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<div class="dropdown-item">
|
||||
<div class="passenger-item">
|
||||
<div class="passenger-info">
|
||||
<h6>بزرگسالان</h6>
|
||||
<p>12+ سال</p>
|
||||
</div>
|
||||
<div class="passenger-qty">
|
||||
<button type="button" class="minus-btn"><i
|
||||
class="far fa-minus"></i></button>
|
||||
<input type="text" name="adult"
|
||||
class="qty-amount passenger-adult"
|
||||
value="2" readonly>
|
||||
<button type="button" class="plus-btn"><i
|
||||
class="far fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-item">
|
||||
<div class="passenger-item">
|
||||
<div class="passenger-info">
|
||||
<h6>کودکان</h6>
|
||||
<p>2-12 سال</p>
|
||||
</div>
|
||||
<div class="passenger-qty">
|
||||
<button type="button" class="minus-btn"><i
|
||||
class="far fa-minus"></i></button>
|
||||
<input type="text" name="children"
|
||||
class="qty-amount passenger-children"
|
||||
value="0" readonly>
|
||||
<button type="button" class="plus-btn"><i
|
||||
class="far fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-item">
|
||||
<div class="passenger-item">
|
||||
<div class="passenger-info">
|
||||
<h6>نوزاد</h6>
|
||||
<p>در زیر 2 سال</p>
|
||||
</div>
|
||||
<div class="passenger-qty">
|
||||
<button type="button" class="minus-btn"><i
|
||||
class="far fa-minus"></i></button>
|
||||
<input type="text" name="infant"
|
||||
class="qty-amount passenger-infant"
|
||||
value="0" readonly>
|
||||
<button type="button" class="plus-btn"><i
|
||||
class="far fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-item">
|
||||
<h6 class="mb-3 mt-2">کلاس کابین</h6>
|
||||
<div class="passenger-class-info">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio"
|
||||
value="Economy" name="cabin-class"
|
||||
id="cabin-class1">
|
||||
<label class="form-check-label"
|
||||
for="cabin-class1">
|
||||
اقتصادی
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" checked
|
||||
type="radio" value="Business"
|
||||
name="cabin-class" id="cabin-class2">
|
||||
<label class="form-check-label"
|
||||
for="cabin-class2">
|
||||
بیزنس
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio"
|
||||
value="First Class" name="cabin-class"
|
||||
id="cabin-class3">
|
||||
<label class="form-check-label"
|
||||
for="cabin-class3">
|
||||
فرست کلس
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flight-search-item flight-multicity-item have-to-clone">
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<label>از</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="text" name="from-destination"
|
||||
class="form-control swap-from" value="مشهد">
|
||||
<i class="fal fa-plane-departure"></i>
|
||||
</div>
|
||||
<p>فرودگاه بین المللی مشهد
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="search-form-swap"><i class="far fa-repeat"></i>
|
||||
</div>
|
||||
<label>به</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="text" name="to-destination"
|
||||
class="form-control swap-to" value="تهران">
|
||||
<i class="fal fa-plane-arrival"></i>
|
||||
</div>
|
||||
<p>فرودگاه بین المللی تهران</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="search-form-date">
|
||||
<div class="search-form-journey">
|
||||
<label>تاریخ سفر</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="text" name="journey-date"
|
||||
class="form-control date-picker journey-date">
|
||||
<i class="fal fa-calendar-days"></i>
|
||||
</div>
|
||||
<p class="journey-day-name"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-group">
|
||||
<div class="multicity-btn">
|
||||
<i class="fal fa-plus-circle"></i> اضافه
|
||||
کردن پروازی دیگر
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="search-btn">
|
||||
<button type="submit" class="theme-btn"><span class="far fa-search"></span>به
|
||||
روز رسانی جستجو
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flight-booking flight-list py-120">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="col-md-12">
|
||||
<div class="booking-sort">
|
||||
<h5><?php echo e($flights->total()); ?> نتیجه پیداشد</h5>
|
||||
<div class="col-md-3 booking-sort-box">
|
||||
<form method="GET" action="<?php echo e(route('flights.index')); ?>" class="flight-sort-form">
|
||||
<input type="hidden" name="from" value="<?php echo e(request('from')); ?>">
|
||||
<input type="hidden" name="to" value="<?php echo e(request('to')); ?>">
|
||||
<input type="hidden" name="departure_date" value="<?php echo e(request('departure_date')); ?>">
|
||||
<select name="sort" class="form-select" onchange="this.form.submit()">
|
||||
<option
|
||||
value="default" <?php echo e(request('sort') == 'default' ? 'selected' : ''); ?>>
|
||||
جدیدترین
|
||||
</option>
|
||||
<option
|
||||
value="popularity" <?php echo e(request('sort') == 'popularity' ? 'selected' : ''); ?>>
|
||||
محبوبترین
|
||||
</option>
|
||||
<option
|
||||
value="lowest" <?php echo e(request('sort') == 'lowest' ? 'selected' : ''); ?>>
|
||||
ارزانترین
|
||||
</option>
|
||||
<option
|
||||
value="highest" <?php echo e(request('sort') == 'highest' ? 'selected' : ''); ?>>
|
||||
گرانترین
|
||||
</option>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<?php $__empty_1 = true; $__currentLoopData = $flights; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $flight): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<div class="flight-booking-item">
|
||||
<div class="flight-booking-wrapper">
|
||||
<div class="flight-booking-info">
|
||||
<div class="flight-booking-content">
|
||||
<div class="flight-booking-airline">
|
||||
<div class="flight-airline-img">
|
||||
<img src="assets/img/flight/airline-7.png" alt>
|
||||
</div>
|
||||
<h5 class="flight-airline-name"><?php echo e($flight->airline?->name); ?></h5>
|
||||
</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(verta($flight->departure_time)->format('Y/m/d')); ?></h6>
|
||||
<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"><?php echo e(verta($flight->arrival_time)->format('Y/m/d')); ?></h6>
|
||||
<span
|
||||
class="flight-destination"><?php echo e($flight->airport->city->name); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flight-booking-price">
|
||||
<div class="price-info">
|
||||
<span class="price-amount"><?php echo e(number_format($flight->price)); ?>
|
||||
|
||||
تومان</span>
|
||||
</div>
|
||||
<a href="#" class="theme-btn">اکنون ثبت کن<i
|
||||
class="far fa-arrow-left"></i></a>
|
||||
</div>
|
||||
</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>
|
||||
</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): ?>
|
||||
<div class="alert alert-warning">هیچ پروازی یافت نشد</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if($flights->hasPages()): ?>
|
||||
<div class="pagination-area">
|
||||
<div aria-label="Page navigation example">
|
||||
<?php echo e($flights->links()); ?>
|
||||
|
||||
</div>
|
||||
<div class="pagination-showing">
|
||||
<p>
|
||||
نمایش <?php echo e($flights->firstItem()); ?> - <?php echo e($flights->lastItem()); ?>
|
||||
|
||||
از <?php echo e($flights->total()); ?> پرواز
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/flights/index.blade.php ENDPATH**/ ?>
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
|
||||
<div class="search-form">
|
||||
<form action="#">
|
||||
<form action="<?php echo e(route('tours.show' , $tour->id)); ?>">
|
||||
<?php echo csrf_field(); ?>
|
||||
<input type="hidden" name="tour_id" value="<?php echo e($tour->id); ?>">
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<div class="search-form-date">
|
||||
<label for="departure_date">تاریخ رفت</label>
|
||||
<div class="search-form-return">
|
||||
<label for="departure_date">زمان رفت</label>
|
||||
<input
|
||||
type="text"
|
||||
id="departure_date"
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<!-- Start::app-content -->
|
||||
<div class="container-lg">
|
||||
<div class="row justify-content-center align-items-center authentication authentication-basic h-100">
|
||||
<div class="col-xxl-4 col-xl-5 col-lg-5 col-md-6 col-sm-8 col-12">
|
||||
<div class="card custom-card my-4 auth-circle">
|
||||
<div class="card-body p-5">
|
||||
<p class="h4 mb-3 fw-semibold text-center">
|
||||
ورود به پنل مدیریت
|
||||
</p>
|
||||
<p class="mb-4 text-muted text-center">
|
||||
برای ورود به پنل مدیریت لطفا اطلاعات فرم را وارد کنید.
|
||||
</p>
|
||||
|
||||
|
||||
<form method="POST" action="<?php echo e(route('admin.auth.login.post')); ?>">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="col-xl-12">
|
||||
<label for="login-email" class="form-label text-default">نام کاربری</label>
|
||||
<input
|
||||
type="text"
|
||||
name="username"
|
||||
class="form-control"
|
||||
id="login-username"
|
||||
placeholder="نام کاربری خود را وارد کنید."
|
||||
value="<?php echo e(old('username')); ?>"
|
||||
/>
|
||||
<?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 style="color: red"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="col-xl-12">
|
||||
<label for="login-password" class="form-label text-default">رمز عبور</label>
|
||||
<div class="position-relative">
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
class="form-control"
|
||||
id="login-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 style="color: red"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-grid mt-4">
|
||||
<button type="submit" class="btn btn-primary">ورود</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End::app-content -->
|
||||
<?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/login.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($tour?->file_id ?? asset('assets/img/activity/01.jpg')); ?>"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php if($tour->coverImage?->file): ?>
|
||||
<img src="<?php echo e(getFileUrl($tour->coverImage->file_id)); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo e(asset('assets/Admin/images/tour/single-2.jpg')); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if(auth()->guard()->check()): ?>
|
||||
<form action="<?php echo e(route('accounts.favorites.tour.toggle', ['tour' => $tour->id])); ?>"
|
||||
method="POST"
|
||||
|
||||
@@ -169,7 +169,8 @@
|
||||
<div class="flex-fill fw-medium fs-13 mb-1 text-dark">آمار بازدید سایت</div>
|
||||
<div
|
||||
class="fs-22 fw-semibold mb-1 text-pink">
|
||||
5
|
||||
<?php echo e(number_format($siteTotalViews)); ?>
|
||||
|
||||
</div>
|
||||
<div class="d-flex align-items-center fs-11">
|
||||
<span class="text-default op-6">تا این لحظه </span>
|
||||
@@ -202,5 +203,69 @@
|
||||
|
||||
</div>
|
||||
<?php $__env->stopSection(); ?>
|
||||
<?php $__env->startPush('scripts'); ?>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const chartElement = document.querySelector('#ordersChart');
|
||||
|
||||
if (!chartElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
const options = {
|
||||
series: [{
|
||||
name: 'بازدید سایت',
|
||||
data: <?php echo json_encode($siteViewsData, 15, 512) ?>,
|
||||
}],
|
||||
chart: {
|
||||
type: 'bar',
|
||||
height: 360,
|
||||
toolbar: {
|
||||
show: false
|
||||
},
|
||||
fontFamily: 'IRANSans, sans-serif'
|
||||
},
|
||||
colors: ['#e75480'],
|
||||
plotOptions: {
|
||||
bar: {
|
||||
horizontal: false,
|
||||
columnWidth: '45%',
|
||||
borderRadius: 5,
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false
|
||||
},
|
||||
xaxis: {
|
||||
categories: <?php echo json_encode($chartLabels, 15, 512) ?>,
|
||||
title: {
|
||||
text: '۱۰ روز اخیر'
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
min: 0,
|
||||
forceNiceScale: true,
|
||||
title: {
|
||||
text: 'تعداد بازدید'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
borderColor: '#e9edf4',
|
||||
strokeDashArray: 3
|
||||
},
|
||||
tooltip: {
|
||||
y: {
|
||||
formatter: function (value) {
|
||||
return value.toLocaleString('fa-IR') + ' بازدید';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
new ApexCharts(chartElement, options).render();
|
||||
});
|
||||
</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/dashboard.blade.php ENDPATH**/ ?>
|
||||
@@ -1,562 +0,0 @@
|
||||
<?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**/ ?>
|
||||
@@ -1,434 +0,0 @@
|
||||
<?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\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', $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\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', $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\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', $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\Admin\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\Admin\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,54 +0,0 @@
|
||||
<?php $__env->startSection('breadcrumb'); ?>
|
||||
<div>
|
||||
<div>
|
||||
<h1 class="page-title fw-medium fs-18 mb-2">
|
||||
جزئیات کاربر
|
||||
<?php echo e(getUserFullName($user)); ?>
|
||||
|
||||
</h1>
|
||||
<div class="">
|
||||
<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">
|
||||
|
||||
|
||||
<!-- User Info Card -->
|
||||
<div class="card custom-card mb-4">
|
||||
<div class="card-header">
|
||||
<div class="card-title">اطلاعات کاربر</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center p-3 pt-0">
|
||||
<div class="card-body flex-grow-1">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-sm-3 my-2 fw-semibold">نام کامل:</dt>
|
||||
<dd class="col-sm-9 my-2"><?php echo e(getUserFullName($user)); ?></dd>
|
||||
|
||||
<dt class="col-sm-3 my-2 fw-semibold">ایمیل:</dt>
|
||||
<dd class="col-sm-9 my-2"><?php echo e($user->email); ?></dd>
|
||||
|
||||
<dt class="col-sm-3 my-2 fw-semibold">شماره تلفن:</dt>
|
||||
<dd class="col-sm-9 my-2"><?php echo e($user->mobile); ?></dd>
|
||||
|
||||
<dt class="col-sm-3 my-2 fw-semibold">تاریخ ثبتنام:</dt>
|
||||
<dd class="col-sm-9 my-2"><?php echo e($user->created_at->toJalali()->format('H:i Y-m-d')); ?></dd>
|
||||
</dl>
|
||||
</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/users/show.blade.php ENDPATH**/ ?>
|
||||
@@ -1,22 +1,20 @@
|
||||
<div class="listing-content">
|
||||
<div class="listing-slider owl-carousel owl-theme" dir="ltr">
|
||||
<?php if($tour->images && $tour->images->count() > 0): ?>
|
||||
<?php if($tour->images->count() > 1): ?>
|
||||
<?php $__currentLoopData = $tour->images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<img src="<?php echo e(asset($image->path)); ?>" alt="<?php echo e($tour->title); ?>">
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
<?php else: ?>
|
||||
<img src="<?php echo e(asset($tour->images->first()->path)); ?>" alt="<?php echo e($tour->title); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if($tour->coverImage?->file): ?>
|
||||
<img src="<?php echo e(getFileUrl($tour->coverImage->file_id)); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo e(asset('assets/img/flight/single-1.jpg')); ?>" alt="<?php echo e($tour->title); ?>">
|
||||
<img src="<?php echo e(asset('assets/Admin/images/tour/single-2.jpg')); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="listing-header">
|
||||
<div class="listing-header-info">
|
||||
<h4 class="listing-title"><?php echo e($tour->originCity?->name); ?> - <?php echo e($tour->city?->name); ?></h4>
|
||||
<p class="listing-stop"> سفر <?php echo e($tour->tour_type); ?></p>
|
||||
<p class="listing-stop"> سفر <?php echo e($tour->tour_type->label() ?? 'نامشخص'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,7 +60,7 @@
|
||||
</div>
|
||||
<div class="listing-feature-content">
|
||||
<h6>نوع تور</h6>
|
||||
<span><?php echo e($tour->tour_type ?? 'نامشخص'); ?></span>
|
||||
<span><?php echo e($tour->tour_type?->label() ?? 'نامشخص'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -227,7 +227,15 @@
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="tour-item">
|
||||
<div class="tour-img">
|
||||
<img src="assets/img/tour/01.jpg" alt>
|
||||
<?php if($tour->coverImage?->file): ?>
|
||||
<img src="<?php echo e(getFileUrl($tour->coverImage->file_id)); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo e(asset('assets/Admin/images/tour/single-2.jpg')); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php endif; ?>
|
||||
<a href="#" class="add-wishlist"><i class="far fa-heart"></i></a>
|
||||
</div>
|
||||
<div class="tour-content">
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?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**/ ?>
|
||||
@@ -1,163 +0,0 @@
|
||||
<?php $__env->startSection('breadcrumb'); ?>
|
||||
<div>
|
||||
<div>
|
||||
<h1 class="page-title fw-medium fs-18 mb-2">سطل زباله کاربران</h1>
|
||||
<div class="">
|
||||
<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.users.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.users.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>
|
||||
|
||||
<!-- Start::row -->
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if(session('success')): ?>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<span style="color: green"><?php echo e(session('success')); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($errors->any()): ?>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<span style="color: red"><?php echo e($error); ?></span>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $__empty_1 = true; $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-fill">
|
||||
<span class="fw-medium fs-14 d-block text-truncate">
|
||||
<?php echo e(getUserFullName($user)); ?>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td><?php echo e($user->email); ?></td>
|
||||
|
||||
<td><?php echo e($user->mobile); ?></td>
|
||||
|
||||
<td><?php echo e($user->created_at->toJalali()->format('H:i Y-m-d')); ?></td>
|
||||
|
||||
<td><?php echo e($user->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.users.restore', $user->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.users.forceDelete', $user->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="6" class="text-center">
|
||||
کاربری در سطل زباله وجود ندارد.
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="card-footer d-flex justify-content-center align-items-center">
|
||||
<div>
|
||||
<?php echo e($users->links()); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End::row -->
|
||||
|
||||
</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/users/trash.blade.php ENDPATH**/ ?>
|
||||
@@ -1,242 +0,0 @@
|
||||
<?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.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">
|
||||
|
||||
<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.tours.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>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if(session('success')): ?>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<span style="color: green">
|
||||
<?php echo e(session('success')); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(session('error')): ?>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<span style="color: red">
|
||||
<?php echo e(session('error')); ?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($errors->any()): ?>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<?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 = $tours; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tour): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="avatar avatar-md avatar-square bg-light">
|
||||
<?php if($tour->coverImage?->file): ?>
|
||||
<img src="<?php echo e(getFileUrl($tour->coverImage->file_id)); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo e(asset('assets/admin/images/faces/DefaultAvatar.jpg')); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($tour->title); ?>">
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="fw-medium">
|
||||
<?php echo e($tour->title); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if($tour->summary): ?>
|
||||
<small class="text-muted d-inline-block text-truncate"
|
||||
style="max-width: 180px;">
|
||||
<?php echo e($tour->summary); ?>
|
||||
|
||||
</small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($tour->originCity?->name ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($tour->city?->name ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if($tour->tour_type): ?>
|
||||
<span class="badge bg-success-transparent">
|
||||
<?php echo e($tour->tour_type->label()); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if($tour->tour_scope): ?>
|
||||
<span class="badge bg-primary-transparent">
|
||||
<?php echo e($tour->tour_scope->label()); ?>
|
||||
|
||||
</span>
|
||||
<?php else: ?>
|
||||
-
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($tour->created_at?->toJalali()->format('H:i Y/m/d') ?? '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($tour->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.tours.trash.restore', $tour->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.tours.trash.forceDelete', $tour->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="9" 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($tours->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/tours/trash.blade.php ENDPATH**/ ?>
|
||||
@@ -1,426 +0,0 @@
|
||||
<?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\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>
|
||||
<?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**/ ?>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?php $__env->startSection('title', __('Page Expired')); ?>
|
||||
<?php $__env->startSection('code', '419'); ?>
|
||||
<?php $__env->startSection('message', __('Page Expired')); ?>
|
||||
|
||||
<?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/419.blade.php ENDPATH**/ ?>
|
||||
@@ -1,147 +0,0 @@
|
||||
<?php $__env->startSection('breadcrumb'); ?>
|
||||
<div>
|
||||
<div>
|
||||
<h1 class="page-title fw-medium fs-18 mb-2">
|
||||
ویرایش کاربر
|
||||
<?php echo e(getUserFullName($user)); ?>
|
||||
|
||||
</h1>
|
||||
<div class="">
|
||||
<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">
|
||||
<?php if(session('success')): ?>
|
||||
<span style="color: green">
|
||||
<?php echo e(session('success')); ?>
|
||||
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
|
||||
<form
|
||||
action="<?php echo e(route('admin.users.update', $user)); ?>"
|
||||
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">
|
||||
|
||||
|
||||
<!-- User Fields -->
|
||||
<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' , $user->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 style="color: red"><?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' , $user->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 style="color: red"><?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' , $user->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 style="color: red"><?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' , $user->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 style="color: red"><?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="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 style="color: red"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<button type="submit" class="btn btn-primary">ذخیره تغییرات</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</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/users/edit.blade.php ENDPATH**/ ?>
|
||||
@@ -1,241 +0,0 @@
|
||||
<?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')): ?>
|
||||
<span style="color: green"><?php echo e(session('success')); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if(session('error')): ?>
|
||||
<span style="color: green"><?php echo e(session('error')); ?></span>
|
||||
<?php endif; ?>
|
||||
<div class="col-xl-12">
|
||||
<form action="<?php echo e(route('admin.admins.update' , $admin->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">
|
||||
<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' , $admin->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 style="color: red"><?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' , $admin->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 style="color: red"><?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' , $admin->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 style="color: red"><?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' , $admin?->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 style="color: red"><?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 style="color: red"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
<?php if($canEditSensitiveFields): ?>
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">نوع مدیر</label>
|
||||
|
||||
<select class="form-control" name="is_super">
|
||||
<option value="1" <?php if(old('is_super', $admin->is_super ? '1' : '0') == '1'): echo 'selected'; endif; ?>>
|
||||
مدیر کل
|
||||
</option>
|
||||
|
||||
<option value="0" <?php if(old('is_super', $admin->is_super ? '1' : '0') == '0'): echo 'selected'; endif; ?>>
|
||||
عادی
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<?php $__errorArgs = ['is_super'];
|
||||
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
||||
if ($__bag->has($__errorArgs[0])) :
|
||||
if (isset($message)) { $__messageOriginal = $message; }
|
||||
$message = $__bag->first($__errorArgs[0]); ?>
|
||||
<span style="color: red"><?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 = $adminStatuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<option value="<?php echo e($status->value); ?>"
|
||||
<?php if(old('status', $admin->status->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 style="color: red"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
|
||||
<?php elseif($showReadonlySensitiveFields): ?>
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">نوع مدیر</label>
|
||||
|
||||
<div class="form-control bg-light">
|
||||
مدیر کل
|
||||
</div>
|
||||
|
||||
<small class="text-muted">
|
||||
شما نمیتوانید نوع دسترسی خودتان را تغییر دهید.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label">وضعیت</label>
|
||||
|
||||
<div class="form-control bg-light">
|
||||
<?php echo e($admin->status->label()); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<small class="text-muted">
|
||||
شما نمیتوانید وضعیت حساب خودتان را تغییر دهید.
|
||||
</small>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-avatar">
|
||||
<div class="text-center">
|
||||
<label class="form-label d-block fw-semibold">تصویر پروفایل</label>
|
||||
<?php if($admin->avatar?->file_id): ?>
|
||||
<label class="avatar-picker" id="avatarPreview"
|
||||
style="background-image: url('<?php echo e(getFileUrl($admin->avatar->file_id)); ?>')">
|
||||
<input type="file" name="image" accept="image/*"
|
||||
onchange="previewAvatar(this)">
|
||||
</label>
|
||||
<?php else: ?>
|
||||
<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>
|
||||
<?php endif; ?>
|
||||
</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]); ?>
|
||||
<span style="color: red"><?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->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/admins/edit.blade.php ENDPATH**/ ?>
|
||||
@@ -1,188 +0,0 @@
|
||||
<?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.admins.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.admins.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>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if(session('success')): ?>
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<span style="color: green"><?php echo e(session('success')); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($errors->any()): ?>
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<div style="color: red"><?php echo e($error); ?></div>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $__empty_1 = true; $__currentLoopData = $admins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $admin): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="avatar avatar-md avatar-rounded bg-light">
|
||||
<img
|
||||
src="<?php echo e($admin->avatar?->file_id
|
||||
? getFileUrl($admin->avatar->file_id)
|
||||
: asset('assets/admin/images/faces/DefaultAvatar.jpg')); ?>"
|
||||
class="w-100 h-100"
|
||||
alt="<?php echo e($admin->first_name); ?> <?php echo e($admin->last_name); ?>">
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($admin->first_name); ?> <?php echo e($admin->last_name); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($admin->username); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($admin->email ?: '-'); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if($admin->is_super): ?>
|
||||
<span class="badge bg-primary-transparent">مدیر کل</span>
|
||||
<?php else: ?>
|
||||
<span class="badge bg-info-transparent">مدیر عادی</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($admin->created_at->toJalali()->format('H:i Y/m/d')); ?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php echo e($admin->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.admins.trash.restore', $admin->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.admins.trash.force-delete', $admin->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="8" class="text-center">
|
||||
مدیری در سطل زباله وجود ندارد.
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="card-footer d-flex justify-content-center align-items-center">
|
||||
<div>
|
||||
<?php echo e($admins->links()); ?>
|
||||
|
||||
</div>
|
||||
</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/admins/trash.blade.php ENDPATH**/ ?>
|
||||
@@ -1,89 +0,0 @@
|
||||
<?php $__env->startSection('content'); ?>
|
||||
<main class="main">
|
||||
|
||||
<div class="site-breadcrumb" style="background: url(assets/img/breadcrumb/02.jpg)">
|
||||
<div class="container">
|
||||
<h2 class="breadcrumb-title">ورود</h2>
|
||||
<ul class="breadcrumb-menu">
|
||||
<li><a href="<?php echo e(route('index')); ?>">صفحه اصلی</a></li>
|
||||
<li class="active">ورود</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-area py-120">
|
||||
<div class="container">
|
||||
<div class="col-md-5 mx-auto">
|
||||
<?php if($errors->has('general')): ?>
|
||||
<span style="color: red">
|
||||
<?php echo e($errors->first('general')); ?>
|
||||
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<div class="login-form">
|
||||
<div class="login-header">
|
||||
<img src="assets/img/logo/logo-dark.png" alt>
|
||||
<p>با حساب MyTrip خود وارد شوید</p>
|
||||
</div>
|
||||
<form action="<?php echo e(route('auth.login.post')); ?>" method="post">
|
||||
<?php echo csrf_field(); ?>
|
||||
<div class="form-group">
|
||||
<label>آدرس ایمیل</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="email" name="email" class="form-control" placeholder="ایمیل خود را وارد کنید" value="<?php echo e(old('email')); ?>">
|
||||
<i class="far fa-envelope"></i>
|
||||
</div>
|
||||
<?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 style="color: red"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>رمز عبور</label>
|
||||
<div class="form-group-icon">
|
||||
<input type="password" name="password" class="form-control" placeholder="رمز عبور را وارد کنید">
|
||||
<i class="far fa-lock"></i>
|
||||
</div>
|
||||
<?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 style="color: red"><?php echo e($message); ?></span>
|
||||
<?php unset($message);
|
||||
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
||||
endif;
|
||||
unset($__errorArgs, $__bag); ?>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between mb-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value id="remember">
|
||||
<label class="form-check-label" for="remember">
|
||||
مرا به یاد داشته باش
|
||||
</label>
|
||||
</div>
|
||||
<a href="forgot-password.html" class="forgot-pass">رمز عبور را فراموش کرده اید؟</a>
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<button type="submit" class="theme-btn"><i class="far fa-sign-in"></i> ورود</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="login-footer">
|
||||
<div class="login-divider"><span>یا</span></div>
|
||||
<p>اکانت ندارید ؟ <a href="<?php echo e(route('auth.register.index')); ?>">عضو شدن.</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<?php $__env->stopSection(); ?>
|
||||
|
||||
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/auth/login.blade.php ENDPATH**/ ?>
|
||||
Reference in New Issue
Block a user