@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'])
@php $dayShort = ['monday' => 'Pzt', 'tuesday' => 'Sal', 'wednesday' => 'Çar', 'thursday' => 'Per', 'friday' => 'Cum', 'saturday' => 'Cmt', 'sunday' => 'Paz']; @endphp
Sezon & Tarih Oluşturucu

Bir sezon adı yazın, tarih aralığını seçin, turun yapılacağı günleri işaretleyin — gerisini biz halledelim.

1
Sezon adı verin (opsiyonel)
Bu aralıkta oluşturulan tüm tarihler bu grup adıyla etiketlenir; listede birlikte görünür.
2
Tarih aralığını seçin
Tarihler bu aralık içinde oluşturulur.
3
Tur hangi günler yapılacak?
Seçtiğiniz günler turun tekrar eden günleri olarak da kaydedilir.
@foreach($dayNames as $key => $name) @endforeach
Gün seçilmedi

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') }} @if($date->season_name) {{ $date->season_name }} @endif {{ $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