@extends('agency.layouts.app') @section('title', $tour->name . ' - Tarihler') @section('page_title', 'Tur Tarihleri') @php $breadcrumbs = [ ['title' => 'Ana Sayfa', 'url' => route('agency.dashboard')], ['title' => 'Günübirlik Turlar', 'url' => route('agency.products.gunubirlik-turlar.index')], ['title' => $tour->name, 'url' => route('agency.products.gunubirlik-turlar.show', $tour)], ['title' => 'Tarihler', 'url' => ''] ]; $dayNames = [ 'monday' => 'Pazartesi', 'tuesday' => 'Salı', 'wednesday' => 'Çarşamba', 'thursday' => 'Perşembe', 'friday' => 'Cuma', 'saturday' => 'Cumartesi', 'sunday' => 'Pazar' ]; @endphp @push('styles') @endpush @section('content')
Tur Kodu: {{ $tour->code }}

{{ $tour->name }}

{{ $tour->departureCity?->city ?? 'Belirtilmemiş' }}
{{ $tour->start_time }} - {{ $tour->end_time }}
{{ $tourDates->total() }} Tarih
@include('agency.products.gunubirlik-turlar._nav', ['active' => 'dates'])
Tekrar Eden Günler
@foreach($dayNames as $key => $name)
{{ $name }}
@endforeach
Tekrar eden günler mavi olarak işaretlenmiştir. Eğer bu günleri güncellemek istiyorsanız Genel Bilgiler alanından güncelleyebilirsiniz.
Seçili günlerde başlangıç ve bitiş tarihleri arasında otomatik tur tarihleri oluşturulacaktır.

Tur Tarihleri

Oluşturulan tarihleri yönetin ve araç atayın

{{ $tourDates->total() }} Tarih
{{ $tour->tourDates()->where('is_active', true)->count() }} Aktif
{{ $tour->tourDates()->sum('booked_seats') }} Rezervasyon
@if($tourDates->count() > 0)
@foreach($tourDates as $date) @endforeach
Tarih Kapasite Araç Durum İşlemler
{{ \Carbon\Carbon::parse($date->tour_date)->format('d.m.Y') }} - {{ $dayNames[strtolower(\Carbon\Carbon::parse($date->tour_date)->format('l'))] ?? \Carbon\Carbon::parse($date->tour_date)->format('l') }} {{ $date->start_time ?? $tour->start_time }} - {{ $date->end_time ?? $tour->end_time }} @if($date->is_guaranteed) Garanti Kalkış @endif
@php $maxParticipants = $date->max_participants ?? $tour->max_participants ?? 0; $percentage = $maxParticipants > 0 ? (($date->booked_seats + $date->reserved_seats) / $maxParticipants) * 100 : 0; $class = ''; if($percentage >= 90) $class = 'danger'; elseif($percentage >= 70) $class = 'warning'; @endphp
{{ $date->available_seats ?? 0 }}/{{ $maxParticipants }}
{{ $date->booked_seats }} rezervasyon @if($date->reserved_seats > 0) , {{ $date->reserved_seats }} beklemede @endif
{{ strtoupper($date->status) }} @if(!$date->is_active) PASİF @endif
@if($date->booked_seats == 0) @endif
@if($tourDates->hasPages())
{{ $tourDates->links('pagination::bootstrap-5') }}
@endif @else
Henüz tur tarihi oluşturulmamış

Yukarıdaki form ile otomatik tarih oluşturabilirsiniz

@endif
@endsection @push('scripts') @endpush