{{-- Tur detay sayfası — Jolly deseninin modern/sade uyarlaması. Bölümler: galeri kolaj + başlık overlay + aksiyon sidebar'ı → sticky sekmeler → rezervasyon → tur programı → fiyatlar & tarihler → bilgiler. Veri yoksa bölüm hiç render edilmez (sekmeden de düşer). --}} @php $galleryPool = collect($tour->sliderImages ?? collect()) ->concat($tour->galleryImages ?? collect()) ->unique('id') ->values(); $coverUrl = $tour->cover_image_url ?: $galleryPool->first()?->image_url; $collage = $galleryPool->take(5); $currency = $tour->currency ?? 'TRY'; $startingPrice = $tour->starting_price; $itineraries = ($tour->itineraries ?? collect())->where('is_active', true)->values(); $departurePoints = ($tour->transferPoints ?? collect())->where('is_active', true)->values(); $hasProgram = $itineraries->isNotEmpty(); $hasDates = $dates->isNotEmpty(); $hasInfo = filled($tour->description) || filled($tour->places_to_visit) || filled($tour->cancellation_policy) || filled($tour->terms_conditions); $durationText = $isDayTour ? ($tour->duration_hours ? $tour->duration_hours . ' Saat' : 'Günübirlik') : trim((($tour->days ?? $tour->duration) ? ($tour->days ?? $tour->duration) . ' Gün' : '') . ($tour->nights ? ' ' . $tour->nights . ' Gece' : '')); $formAction = $preview ? '#' : route('customer.agency.forms.submit', ['agency' => $agency->slug, 'formKey' => 'reservation']); $callbackAction = $preview ? '#' : route('customer.agency.forms.submit', ['agency' => $agency->slug, 'formKey' => 'callback']); $inclusionList = collect(preg_split('/\r\n|\r|\n/', strip_tags((string) $tour->inclusions)))->map(fn ($s) => trim($s))->filter()->values(); $exclusionList = collect(preg_split('/\r\n|\r|\n/', strip_tags((string) $tour->exclusions)))->map(fn ($s) => trim($s))->filter()->values(); // Panelden girilen zengin metin HTML içerebilir; içermiyorsa satır sonları korunarak escape edilir $rich = fn ($text) => str_contains((string) $text, '<') ? $text : nl2br(e($text)); @endphp @extends('site.templates.voyage.layout', ['pageTitle' => $tour->name . ' | ' . $agency->name, 'ogImage' => $coverUrl]) @section('content') {{-- ======================= GALERİ + BAŞLIK ======================= --}}
@if($tour->is_featured) Öneriyoruz@endif @if($tour->is_bestseller) Çok Satan@endif @if($tour->is_new)Yeni@endif

{{ $tour->name }}

@if($isDayTour ? $tour->departureCity : ($tour->arrivalCity ?? $tour->departureCity)) {{ $isDayTour ? $tour->departureCity?->name : ($tour->arrivalCity?->name ?? $tour->departureCity?->name) }} @endif @if($durationText) {{ $durationText }}@endif @if($tour->has_guide) Profesyonel Rehber@endif @if(($tour->rating_count ?? 0) > 0) {{ number_format((float) $tour->rating_average, 1, ',', '') }} {{ $tour->rating_count }} yorum @endif
@if(!empty($tour->highlights) && is_array($tour->highlights))
    @foreach(array_slice($tour->highlights, 0, 4) as $highlight)
  • {{ $highlight }}
  • @endforeach
@endif
{{-- ======================= STICKY SEKMELER ======================= --}} {{-- ======================= REZERVASYON ======================= --}} @if($hasDates)

Tarih Seçin, Talebinizi İletin

@csrf
@foreach($dates as $index => $date) @php if ($isDayTour) { $label = \Carbon\Carbon::parse($date->tour_date)->translatedFormat('d F Y l'); $capacityLeft = $date->available_seats; $adultPrice = $date->adult_price ?? $tour->adult_price; $dateCurrency = $date->currency ?? $tour->currency ?? $currency; $guaranteed = (bool) $date->is_guaranteed; } else { $label = $date->formatted_date_range ?? (\Carbon\Carbon::parse($date->start_date)->translatedFormat('d F Y') . ' - ' . \Carbon\Carbon::parse($date->end_date)->translatedFormat('d F Y')); $capacityLeft = $date->remaining_capacity; $adultPrice = $date->adult_price; $dateCurrency = $date->currency ?? $currency; $guaranteed = (bool) ($date->guarantee_departure ?? false); } @endphp @endforeach

İletişim Bilgileriniz

@if($errors->any())
@foreach($errors->all() as $error)

{{ $error }}

@endforeach
@endif

Talebiniz bağlayıcı değildir; ekibimiz sizinle iletişime geçerek rezervasyonunuzu birlikte tamamlar.

@endif {{-- ======================= TUR PROGRAMI ======================= --}} @if($hasProgram)

Tur Programı

@foreach($itineraries as $itinerary)
first ? 'open' : '' }}> {{ $isDayTour ? ($itinerary->time ?: ($loop->iteration . '.')) : ($itinerary->day_number . '. Gün') }} {{ $itinerary->title }}
@if($itinerary->location)
@foreach(array_map('trim', explode(',', $itinerary->location)) as $stop) @if($stop !== '') {{ $stop }}@endif @endforeach
@endif
{!! $rich($itinerary->description) !!}
@php $meals = is_array($itinerary->meals ?? null) ? $itinerary->meals : []; $mealLabels = ['breakfast' => 'Kahvaltı', 'lunch' => 'Öğle Yemeği', 'dinner' => 'Akşam Yemeği']; @endphp @if(count($meals) || $itinerary->accommodation)
@if(count($meals)) {{ implode(' · ', array_map(fn ($m) => $mealLabels[$m] ?? $m, $meals)) }} @endif @if($itinerary->accommodation) {{ $itinerary->accommodation }} @endif
@endif
@endforeach
@endif {{-- ======================= FİYATLAR & TARİHLER ======================= --}} @if($hasDates)

Fiyatlar & Tarihler

@foreach($dates as $date) @php if ($isDayTour) { $dateTitle = \Carbon\Carbon::parse($date->tour_date)->translatedFormat('d F Y l'); $rows = [ ['Yetişkin', $date->adult_price ?? $tour->adult_price], ['Çocuk' . ($tour->child_min_age !== null ? ' (' . $tour->child_min_age . '-' . $tour->child_max_age . ' yaş)' : ''), $date->child_price ?? $tour->child_price], ['Bebek' . ($tour->infant_max_age !== null ? ' (0-' . $tour->infant_max_age . ' yaş)' : ''), $date->infant_price ?? $tour->infant_price], ]; $dateCurrency = $date->currency ?? $tour->currency ?? $currency; } else { $dateTitle = ($date->formatted_date_range ?? (\Carbon\Carbon::parse($date->start_date)->translatedFormat('d F Y') . ' - ' . \Carbon\Carbon::parse($date->end_date)->translatedFormat('d F Y'))); $rows = [ ['İki Kişilik Odada Kişi Başı', $date->adult_price], ['Tek Kişilik Oda', $date->adult_price !== null && $date->single_supplement !== null ? (float) $date->adult_price + (float) $date->single_supplement : null], ['İlave Yatak', $date->extra_bed_price], ['1. Çocuk' . ($date->child_min_age !== null ? ' (' . $date->child_min_age . '-' . $date->child_max_age . ' yaş)' : ''), $date->child_price_1], ['2. Çocuk', $date->child_price_2], ['Bebek' . ($date->infant_max_age !== null ? ' (0-' . $date->infant_max_age . ' yaş)' : ''), $date->infant_price], ]; $dateCurrency = $date->currency ?? $currency; } $rows = array_filter($rows, fn ($r) => $r[1] !== null && (float) $r[1] > 0); @endphp
first ? 'open' : '' }}> {{ $dateTitle }} @if(!$isDayTour && ($date->guarantee_departure ?? false))Garantili@endif @if($isDayTour && $date->is_guaranteed)Garantili@endif @if(!$isDayTour && ($date->discount_reason ?? null)){{ $date->discount_reason }}@endif
@if(count($rows))
@foreach($rows as $row)@endforeach @foreach($rows as $row) @endforeach
{{ $row[0] }}
@include('site.templates.voyage.partials.price', ['amount' => $row[1], 'currency' => $dateCurrency])
@else

Bu tarih için fiyat bilgisini telefonla alabilirsiniz.

@endif @if(!$isDayTour && $date->special_notes)

{{ $date->special_notes }}

@endif
@endforeach
@endif {{-- ======================= BİLGİLER ======================= --}} @if($hasInfo)

Bilmeniz Gerekenler

@if($tour->description)

Genel Bilgiler

{!! $rich($tour->description) !!}
@endif @if($tour->places_to_visit)

Gezilecek Yerler

{!! $rich($tour->places_to_visit) !!}
@endif @if($tour->cancellation_policy && is_string($tour->cancellation_policy))

İptal Koşulları

{!! $rich($tour->cancellation_policy) !!}
@endif @if($tour->terms_conditions)

Genel Şartlar

{!! $rich($tour->terms_conditions) !!}
@endif
@endif {{-- ======================= GERİ ARAMA MODALI ======================= --}} @endsection