fix : fix panel admin blades
This commit is contained in:
@@ -19,145 +19,144 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="main-content app-content">
|
||||
<div class="container-fluid pt-4">
|
||||
@error('success')
|
||||
<span class="text-success">{{ $message }}</span>
|
||||
@enderror
|
||||
<div class="container-fluid pt-4">
|
||||
@error('success')
|
||||
<span class="text-success">{{ $message }}</span>
|
||||
@enderror
|
||||
|
||||
@error('error')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card custom-card">
|
||||
@error('error')
|
||||
<span class="text-danger">{{ $message }}</span>
|
||||
@enderror
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card custom-card">
|
||||
|
||||
<div class="card-body p-3">
|
||||
<div class="card-body p-3">
|
||||
|
||||
<form method="GET">
|
||||
<div class="d-flex align-items-center justify-content-between flex-wrap gap-3">
|
||||
<form method="GET">
|
||||
<div class="d-flex align-items-center justify-content-between flex-wrap gap-3">
|
||||
|
||||
<div class="d-flex flex-wrap gap-1 project-list-main align-items-center">
|
||||
<div class="d-flex flex-wrap gap-1 project-list-main align-items-center">
|
||||
|
||||
<div class="d-flex me-2">
|
||||
<input
|
||||
class="form-control me-2"
|
||||
type="search"
|
||||
name="search"
|
||||
placeholder="جستجو پرواز"
|
||||
value="{{ request()->input('search') }}"
|
||||
aria-label="جستجو"
|
||||
>
|
||||
|
||||
<button class="btn btn-light" type="submit">
|
||||
جستجو
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<select
|
||||
id="choices-single-default"
|
||||
class="form-control"
|
||||
name="sort"
|
||||
<div class="d-flex me-2">
|
||||
<input
|
||||
class="form-control me-2"
|
||||
type="search"
|
||||
name="search"
|
||||
placeholder="جستجو پرواز"
|
||||
value="{{ request()->input('search') }}"
|
||||
aria-label="جستجو"
|
||||
>
|
||||
<option value="" selected>
|
||||
مرتبسازی بر اساس
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="created_at"
|
||||
@selected(request()->input('sort') == 'created_at')
|
||||
>
|
||||
جدیدترین
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="price_asc"
|
||||
@selected(request()->input('sort') == 'price_asc')
|
||||
>
|
||||
قیمت (کم به زیاد)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="price_desc"
|
||||
@selected(request()->input('sort') == 'price_desc')
|
||||
>
|
||||
قیمت (زیاد به کم)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="departure_time_asc"
|
||||
@selected(request()->input('sort') == 'departure_time_asc')
|
||||
>
|
||||
زمان حرکت (زودترین)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="departure_time_desc"
|
||||
@selected(request()->input('sort') == 'departure_time_desc')
|
||||
>
|
||||
زمان حرکت (دیرترین)
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<button class="btn btn-light" type="submit">
|
||||
جستجو
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if(auth('admin')->user()->permission?->flight_create)
|
||||
<div class="d-flex">
|
||||
<a
|
||||
href="{{ route('admin.flights.create') }}"
|
||||
class="btn btn-primary me-2"
|
||||
>
|
||||
<i class="ri-add-line me-1 fw-medium align-middle"></i>
|
||||
ایجاد پرواز
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
<select
|
||||
id="choices-single-default"
|
||||
class="form-control"
|
||||
name="sort"
|
||||
>
|
||||
<option value="" selected>
|
||||
مرتبسازی بر اساس
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="created_at"
|
||||
@selected(request()->input('sort') == 'created_at')
|
||||
>
|
||||
جدیدترین
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="price_asc"
|
||||
@selected(request()->input('sort') == 'price_asc')
|
||||
>
|
||||
قیمت (کم به زیاد)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="price_desc"
|
||||
@selected(request()->input('sort') == 'price_desc')
|
||||
>
|
||||
قیمت (زیاد به کم)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="departure_time_asc"
|
||||
@selected(request()->input('sort') == 'departure_time_asc')
|
||||
>
|
||||
زمان حرکت (زودترین)
|
||||
</option>
|
||||
|
||||
<option
|
||||
value="departure_time_desc"
|
||||
@selected(request()->input('sort') == 'departure_time_desc')
|
||||
>
|
||||
زمان حرکت (دیرترین)
|
||||
</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@if(auth('admin')->user()->permission?->flight_create)
|
||||
<div class="d-flex">
|
||||
<a
|
||||
href="{{ route('admin.flights.create') }}"
|
||||
class="btn btn-primary me-2"
|
||||
>
|
||||
<i class="ri-add-line me-1 fw-medium align-middle"></i>
|
||||
ایجاد پرواز
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Flights Table -->
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<!-- Flights Table -->
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
|
||||
<div class="card custom-card">
|
||||
<div class="card custom-card">
|
||||
|
||||
<div class="table-responsive">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table text-nowrap table-bordered">
|
||||
<table class="table text-nowrap table-bordered">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>عکس</th>
|
||||
<th>عنوان</th>
|
||||
<th>ایرلاین</th>
|
||||
<th>نوع پرواز</th>
|
||||
<th>زمان حرکت</th>
|
||||
<th>مبدا</th>
|
||||
<th>مقصد</th>
|
||||
<th>قیمت</th>
|
||||
<th>ظرفیت</th>
|
||||
<th>وضعیت</th>
|
||||
<th>تاریخ ثبت</th>
|
||||
<th>تاریخ ویرایش</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($flights as $flight)
|
||||
|
||||
<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>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($flights as $flight)
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<td>
|
||||
<span class="avatar avatar-md avatar-square bg-light">
|
||||
|
||||
@if($flight->file?->id)
|
||||
@@ -175,147 +174,146 @@
|
||||
@endif
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<td>
|
||||
<span class="fw-semibold">
|
||||
{{ $flight->title }}
|
||||
</span>
|
||||
</td>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->airline?->name}}
|
||||
</td>
|
||||
<td>
|
||||
{{ $flight->airline?->name}}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@switch($flight->flight_type)
|
||||
<td>
|
||||
@switch($flight->flight_type)
|
||||
|
||||
@case(0)
|
||||
<span class="badge bg-primary-transparent">
|
||||
@case(0)
|
||||
<span class="badge bg-primary-transparent">
|
||||
رفت
|
||||
</span>
|
||||
@break
|
||||
@break
|
||||
|
||||
@case(1)
|
||||
<span class="badge bg-warning-transparent">
|
||||
@case(1)
|
||||
<span class="badge bg-warning-transparent">
|
||||
برگشت
|
||||
</span>
|
||||
@break
|
||||
@break
|
||||
|
||||
@case(2)
|
||||
<span class="badge bg-success-transparent">
|
||||
@case(2)
|
||||
<span class="badge bg-success-transparent">
|
||||
رفت و برگشت
|
||||
</span>
|
||||
@break
|
||||
@break
|
||||
|
||||
@default
|
||||
-
|
||||
@endswitch
|
||||
</td>
|
||||
@default
|
||||
-
|
||||
@endswitch
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->departure_time->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $flight->departure_time->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->departureAirport?->city?->name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $flight->departureAirport?->city?->name }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->arrivalAirport?->city?->name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $flight->arrivalAirport?->city?->name }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ number_format($flight->price) }}
|
||||
تومان
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($flight->price) }}
|
||||
تومان
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->capacity }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $flight->capacity }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if($flight->status == \App\Enums\FlightStatus::ENABLE)
|
||||
<span class="badge bg-primary-transparent">
|
||||
<td>
|
||||
@if($flight->status == \App\Enums\FlightStatus::ENABLE)
|
||||
<span class="badge bg-primary-transparent">
|
||||
فعال
|
||||
</span>
|
||||
@elseif($flight->status == \App\Enums\FlightStatus::DISABLE )
|
||||
<span class="badge bg-warning-transparent">
|
||||
@elseif($flight->status == \App\Enums\FlightStatus::DISABLE )
|
||||
<span class="badge bg-warning-transparent">
|
||||
غیرفعال
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->created_at->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->updated_at->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="hstack gap-2 fs-15">
|
||||
|
||||
@if(auth('admin')->user()->permission?->flight_edit)
|
||||
|
||||
<a
|
||||
href="{{ route('admin.flights.edit', $flight->id) }}"
|
||||
class="btn btn-secondary-light btn-icon btn-sm"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="ویرایش"
|
||||
>
|
||||
<i class="ti ti-pencil"></i>
|
||||
</a>
|
||||
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->created_at->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $flight->updated_at->toJalali()->format('H:i Y-m-d') }}
|
||||
</td>
|
||||
@if(auth('admin')->user()->permission?->flight_delete)
|
||||
|
||||
<td>
|
||||
<div class="hstack gap-2 fs-15">
|
||||
<form
|
||||
action="{{ route('admin.flights.destroy', $flight->id) }}"
|
||||
method="POST"
|
||||
onsubmit="return confirm('آیا از حذف این پرواز مطمئن هستید؟')"
|
||||
>
|
||||
|
||||
@if(auth('admin')->user()->permission?->flight_edit)
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
|
||||
<a
|
||||
href="{{ route('admin.flights.edit', $flight->id) }}"
|
||||
class="btn btn-secondary-light btn-icon btn-sm"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
title="ویرایش"
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-icon btn-sm btn-danger-light"
|
||||
title="حذف"
|
||||
>
|
||||
<i class="ti ti-pencil"></i>
|
||||
</a>
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
|
||||
@endif
|
||||
</form>
|
||||
|
||||
@endif
|
||||
|
||||
@if(auth('admin')->user()->permission?->flight_delete)
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<form
|
||||
action="{{ route('admin.flights.destroy', $flight->id) }}"
|
||||
method="POST"
|
||||
onsubmit="return confirm('آیا از حذف این پرواز مطمئن هستید؟')"
|
||||
>
|
||||
</tr>
|
||||
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
@endforeach
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-icon btn-sm btn-danger-light"
|
||||
title="حذف"
|
||||
>
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
</tbody>
|
||||
|
||||
</form>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
{{ $flights->links() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ $flights->links() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user