277 lines
14 KiB
PHP
277 lines
14 KiB
PHP
<?php $__env->startSection('breadcrumb'); ?>
|
|
<div>
|
|
<h1 class="page-title fw-medium fs-18 mb-2">لیست پروازها</h1>
|
|
|
|
<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>
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php $__env->startSection('content'); ?>
|
|
<div class="container-fluid pt-4">
|
|
|
|
<?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="row">
|
|
<div class="col-xl-12">
|
|
<div class="card custom-card">
|
|
<div class="card-body p-3">
|
|
<form method="GET" action="<?php echo e(route('admin.flights.index')); ?>">
|
|
<div class="d-flex align-items-center justify-content-between flex-wrap gap-3">
|
|
|
|
<div class="d-flex flex-wrap gap-2 project-list-main align-items-center">
|
|
<div class="d-flex">
|
|
<input class="form-control me-2"
|
|
type="search"
|
|
name="search"
|
|
placeholder="جستوجوی شماره پرواز"
|
|
value="<?php echo e(request('search')); ?>"
|
|
aria-label="جستوجو">
|
|
|
|
<button class="btn btn-light" type="submit">
|
|
جستوجو
|
|
</button>
|
|
</div>
|
|
|
|
<select class="form-control"
|
|
name="sort"
|
|
onchange="this.form.submit()">
|
|
<option value="">مرتبسازی بر اساس</option>
|
|
|
|
<option value="newest"
|
|
<?php if(request()->missing('sort') || request('sort') === 'newest'): echo 'selected'; endif; ?>>
|
|
جدیدترین
|
|
</option>
|
|
|
|
<option value="lowest"
|
|
<?php if(request('sort') === 'lowest'): echo 'selected'; endif; ?>>
|
|
کمترین قیمت
|
|
</option>
|
|
|
|
<option value="highest"
|
|
<?php if(request('sort') === 'highest'): echo 'selected'; endif; ?>>
|
|
بیشترین قیمت
|
|
</option>
|
|
|
|
<option value="popularity"
|
|
<?php if(request('sort') === 'popularity'): echo 'selected'; endif; ?>>
|
|
پر بازدیدترین
|
|
</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="d-flex align-items-center gap-2">
|
|
<a href="<?php echo e(route('admin.flights.trash.index')); ?>"
|
|
class="btn btn-danger-light d-flex align-items-center">
|
|
<i class="ri-delete-bin-3-line me-1 fw-medium align-middle"></i>
|
|
سطل زباله
|
|
</a>
|
|
|
|
<a href="<?php echo e(route('admin.flights.create')); ?>"
|
|
class="btn btn-primary">
|
|
<i class="ri-add-line me-1 fw-medium align-middle"></i>
|
|
ایجاد پرواز
|
|
</a>
|
|
</div>
|
|
|
|
</div>
|
|
</form>
|
|
</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 align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>تصویر</th>
|
|
<th>شماره پرواز</th>
|
|
<th>ایرلاین</th>
|
|
<th>مبدأ</th>
|
|
<th>مقصد</th>
|
|
<th>زمان حرکت</th>
|
|
<th>قیمت</th>
|
|
<th>ظرفیت</th>
|
|
<th>وضعیت</th>
|
|
<th>بازدید</th>
|
|
<th>تاریخ ایجاد</th>
|
|
<th>اقدامات</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php $__empty_1 = true; $__currentLoopData = $flights; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $flight): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
|
<tr>
|
|
<td>
|
|
<span class="avatar avatar-md avatar-square bg-light">
|
|
<?php if($flight->coverImage?->file_id): ?>
|
|
<img src="<?php echo e(getFileUrl($flight->coverImage->file_id)); ?>"
|
|
class="w-100 h-100"
|
|
alt="<?php echo e($flight->flight_number); ?>">
|
|
<?php else: ?>
|
|
-
|
|
<?php endif; ?>
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<span class="fw-medium">
|
|
<?php echo e($flight->flight_number); ?>
|
|
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<?php echo e($flight->airline?->name ?? '-'); ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
<div class="fw-medium">
|
|
<?php echo e($flight->origin_airport?->city?->name ?? '-'); ?>
|
|
|
|
</div>
|
|
|
|
<?php if($flight->origin_airport?->name): ?>
|
|
<small class="text-muted">
|
|
<?php echo e($flight->origin_airport->name); ?>
|
|
|
|
</small>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td>
|
|
<div class="fw-medium">
|
|
<?php echo e($flight->airport?->city?->name ?? '-'); ?>
|
|
|
|
</div>
|
|
|
|
<?php if($flight->airport?->name): ?>
|
|
<small class="text-muted">
|
|
<?php echo e($flight->airport->name); ?>
|
|
|
|
</small>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td>
|
|
<?php if($flight->departure_time): ?>
|
|
<?php echo e(\Hekmatinasser\Verta\Verta::instance($flight->departure_time)->format('d F Y - H:i')); ?>
|
|
|
|
<?php else: ?>
|
|
-
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td>
|
|
<?php echo e(number_format($flight->price)); ?> تومان
|
|
</td>
|
|
|
|
<td>
|
|
<span class="badge bg-info-transparent">
|
|
<?php echo e($flight->capacity); ?> نفر
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<?php if($flight->status): ?>
|
|
<span class="badge bg-success-transparent">
|
|
<?php echo e($flight->status->label()); ?>
|
|
|
|
</span>
|
|
<?php else: ?>
|
|
-
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td>
|
|
<?php echo e(number_format($flight->views_count ?? 0)); ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
<?php if($flight->created_at): ?>
|
|
<?php echo e(\Hekmatinasser\Verta\Verta::instance($flight->created_at)->format('d F Y - H:i')); ?>
|
|
|
|
<?php else: ?>
|
|
-
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td>
|
|
<div class="hstack gap-2 fs-15">
|
|
<a href="<?php echo e(route('admin.flights.show', $flight->id)); ?>"
|
|
class="btn btn-info-light btn-icon btn-sm"
|
|
title="مشاهده">
|
|
<i class="ri-eye-line"></i>
|
|
</a>
|
|
|
|
<a href="<?php echo e(route('admin.flights.edit', $flight->id)); ?>"
|
|
class="btn btn-secondary-light btn-icon btn-sm"
|
|
title="ویرایش">
|
|
<i class="ti ti-pencil"></i>
|
|
</a>
|
|
|
|
<form action="<?php echo e(route('admin.flights.destroy', $flight->id)); ?>"
|
|
method="POST"
|
|
class="d-inline"
|
|
onsubmit="return confirm('از حذف این پرواز مطمئن هستید؟')">
|
|
<?php echo csrf_field(); ?>
|
|
<?php echo method_field('DELETE'); ?>
|
|
|
|
<button type="submit"
|
|
class="btn btn-icon btn-sm btn-danger-light"
|
|
title="حذف">
|
|
<i class="ri-delete-bin-line"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
|
<tr>
|
|
<td colspan="12" class="text-center text-muted py-4">
|
|
هیچ پروازی یافت نشد.
|
|
</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-end mt-3">
|
|
<?php echo e($flights->links()); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\ASUS\Desktop\airline-agency\resources\views/admin/flights/index.blade.php ENDPATH**/ ?>
|