fix:change admin routes and flight blade
This commit is contained in:
@@ -1,13 +1,28 @@
|
||||
<div class="col-md-6 col-lg-3">
|
||||
|
||||
<div class="flight-item">
|
||||
|
||||
{{-- Flight Image --}}
|
||||
<div class="flight-img">
|
||||
|
||||
<img
|
||||
src="{{ asset('assets/img/flight/01.jpg') }}"
|
||||
alt="{{ $flight->title }}"
|
||||
>
|
||||
@if($flight->file?->path)
|
||||
|
||||
<img
|
||||
src="{{ asset('storage/' . $flight->file->path) }}"
|
||||
alt="{{ $flight->title }}"
|
||||
>
|
||||
|
||||
@else
|
||||
|
||||
<img
|
||||
src="{{ asset('assets/img/flight/01.jpg') }}"
|
||||
alt="{{ $flight->title }}"
|
||||
>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
{{-- Favorite --}}
|
||||
@if(auth()->check())
|
||||
|
||||
<form
|
||||
@@ -40,56 +55,117 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Flight Content --}}
|
||||
<div class="flight-content">
|
||||
|
||||
{{-- Title --}}
|
||||
<div class="flight-title">
|
||||
|
||||
<div class="flight-title-info">
|
||||
|
||||
<img
|
||||
src="{{ asset('assets/img/flight/airline-1.png') }}"
|
||||
alt=""
|
||||
>
|
||||
{{-- Airline Logo --}}
|
||||
@if($flight->airline?->file?->path)
|
||||
|
||||
<img
|
||||
src="{{ asset('storage/' . $flight->airline->file->path) }}"
|
||||
alt="{{ $flight->airline->name }}"
|
||||
>
|
||||
|
||||
@else
|
||||
|
||||
<img
|
||||
src="{{ asset('assets/img/flight/airline-1.png') }}"
|
||||
alt="{{ $flight->airline?->name ?? 'Airline' }}"
|
||||
>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
<h4>
|
||||
<a href="{{ route('flights.show', $flight->id) }}">
|
||||
|
||||
{{ $flight->departureAirport->city->name }}
|
||||
{{ $flight->departureAirport?->city?->name ?? '-' }}
|
||||
|
||||
<i class="far fa-exchange"></i>
|
||||
|
||||
{{ $flight->arrivalAirport->city->name }}
|
||||
{{ $flight->arrivalAirport?->city?->name ?? '-' }}
|
||||
|
||||
</a>
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Date --}}
|
||||
<p class="flight-date">
|
||||
|
||||
<i class="far fa-calendar-days"></i>
|
||||
|
||||
{{ $flight->departure_time->toJalali()->format('Y/m/d H:i') }}
|
||||
{{ $flight->departure_time?->toJalali()->format('Y/m/d H:i') ?? '-' }}
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Flight Type --}}
|
||||
<div class="mb-2">
|
||||
|
||||
@if($flight->flight_type === \App\Enums\FlightType::DEPARTURE)
|
||||
|
||||
<span class="badge bg-primary">
|
||||
یکطرفه
|
||||
</span>
|
||||
|
||||
@elseif($flight->flight_type === \App\Enums\FlightType::RETURN)
|
||||
|
||||
<span class="badge bg-info">
|
||||
برگشت
|
||||
</span>
|
||||
|
||||
@elseif($flight->flight_type === \App\Enums\FlightType::ROUNDTRIP)
|
||||
|
||||
<span class="badge bg-warning">
|
||||
رفت و برگشت
|
||||
</span>
|
||||
|
||||
@else
|
||||
|
||||
<span class="badge bg-secondary">
|
||||
نامشخص
|
||||
</span>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Bottom --}}
|
||||
<div class="flight-bottom">
|
||||
|
||||
{{-- Price --}}
|
||||
<div class="flight-price">
|
||||
|
||||
از
|
||||
|
||||
<span>
|
||||
{{ number_format($flight->price) }} تومان
|
||||
{{ number_format($flight->price) }}
|
||||
تومان
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Details --}}
|
||||
<div class="flight-text-btn">
|
||||
|
||||
<a href="{{ route('flights.show', $flight->id) }}">
|
||||
|
||||
نمایش جزئیات
|
||||
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
@@ -99,4 +175,5 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user