@php $statusLabel = $tour->is_draft ? 'Taslak' : ($tour->is_active ? ($tour->is_public ? 'Yayında' : 'Gizli') : 'Pasif'); $statusClass = $tour->is_draft ? 'pqv-b-amber' : ($tour->is_active ? ($tour->is_public ? 'pqv-b-green' : 'pqv-b-slate') : 'pqv-b-red'); $marketplaces = $tour->product?->marketplaces ?? collect(); $editBase = 'agency.products.gunubirlik-turlar'; $uf = route("$editBase.update-field", $tour); $cityOptions = collect($cities)->map(fn($c) => ['value' => (string) $c->id, 'label' => $c->city ?? $c->name])->values(); $boolOptions = [['value' => '1', 'label' => 'Evet'], ['value' => '0', 'label' => 'Hayır']]; $tourTypeOptions = [['value' => 'domestic', 'label' => 'Yurt İçi'], ['value' => 'international', 'label' => 'Yurt Dışı']]; $difficultyOptions = [['value' => 'easy', 'label' => 'Kolay'], ['value' => 'moderate', 'label' => 'Orta'], ['value' => 'challenging', 'label' => 'Zor'], ['value' => 'extreme', 'label' => 'Çok Zor']]; // Para birimleri: statik pricing.blade gibi ajansın aktif para birimlerinden; yoksa güvenli varsayılan liste. $currencyOptions = collect($activeCurrencies ?? []) ->map(fn($c) => ['value' => $c->code, 'label' => $c->code])->values()->all(); if (empty($currencyOptions)) { $currencyOptions = [['value' => 'TRY', 'label' => 'TRY'], ['value' => 'USD', 'label' => 'USD'], ['value' => 'EUR', 'label' => 'EUR'], ['value' => 'GBP', 'label' => 'GBP']]; } @endphp {{ $tour->name }} {{ $statusLabel }} {{ $tour->code ?? '—' }} {{ $tour->tour_type === 'domestic' ? 'Yurt İçi' : 'Yurt Dışı' }} @if($tour->departureCity) {{ $tour->departureCity?->city ?? $tour->departureCity?->name }} @endif
SAAT {{ substr($tour->start_time ?? '', 0, 5) ?: '—' }}@if($tour->end_time)–{{ substr($tour->end_time, 0, 5) }}@endif
FİYAT {{ $tour->adult_price ? number_format($tour->adult_price, 0, ',', '.') . ' ' . $tour->currency : '—' }}
YAKLAŞAN TARİH {{ $tour->upcomingDates->count() }}
@if($tour->is_draft) @endif
{{-- ── GENEL ── --}}
@include('agency.products._qv-general-inline', [ 'tour' => $tour, 'editBase' => $editBase, 'cities' => $cities, 'categories' => $categories, 'uf' => $uf, 'productType' => 'day', ])
{{-- ── PROGRAM ── --}}
@php $actTypes = ['sightseeing'=>'Gezi','cultural'=>'Kültürel','meal'=>'Yemek','transfer'=>'Transfer','activity'=>'Aktivite','free'=>'Serbest Zaman']; @endphp
Tur Programı
@forelse($tour->activeItineraries as $itinerary) @php $itTime = $itinerary->time ?? $itinerary->start_time; @endphp
@if($itTime)
{{ substr($itTime, 0, 5) }}
@endif
{{ $itinerary->title }}
@if($itinerary->location)
{{ $itinerary->location }}
@endif @if($itinerary->description)
{!! $itinerary->description !!}
@endif
{!! $itinerary->description !!}
@empty

Henüz program eklenmemiş.

@endforelse
{{-- ── FİYATLANDIRMA ── --}}
Varsayılan Fiyatlar
@include('agency.products._qv-field', ['field' => 'adult_price', 'label' => 'Yetişkin Fiyatı', 'type' => 'number', 'current' => $tour->adult_price, 'display' => $tour->adult_price !== null ? number_format($tour->adult_price, 2, ',', '.') . ' ' . $tour->currency : '—']) @include('agency.products._qv-field', ['field' => 'child_price', 'label' => 'Çocuk Fiyatı', 'type' => 'number', 'current' => $tour->child_price, 'display' => $tour->child_price !== null ? number_format($tour->child_price, 2, ',', '.') . ' ' . $tour->currency : '—']) @include('agency.products._qv-field', ['field' => 'infant_price', 'label' => 'Bebek Fiyatı', 'type' => 'number', 'current' => $tour->infant_price, 'display' => $tour->infant_price !== null ? number_format($tour->infant_price, 2, ',', '.') . ' ' . $tour->currency : '—']) @include('agency.products._qv-field', ['field' => 'currency', 'label' => 'Para Birimi', 'type' => 'select', 'options' => $currencyOptions, 'current' => $tour->currency, 'display' => $tour->currency])
{{-- Yaş aralıkları (statik pricing.blade ile birebir) --}}
Yaş Aralıkları
@include('agency.products._qv-field', ['field' => 'child_min_age', 'label' => 'Çocuk Min. Yaş', 'type' => 'number', 'display' => $tour->child_min_age]) @include('agency.products._qv-field', ['field' => 'child_max_age', 'label' => 'Çocuk Maks. Yaş', 'type' => 'number', 'display' => $tour->child_max_age]) @include('agency.products._qv-field', ['field' => 'infant_max_age', 'label' => 'Bebek Maks. Yaş', 'type' => 'number', 'display' => $tour->infant_max_age])
Bu aralıklar rezervasyonda yolcu tipini belirler.
{{-- Pazaryeri bazlı fiyatlar (blok otomatik kayıt) --}}
Pazaryeri Bazlı Fiyatlar
@if($marketplaces->count())
@foreach($marketplaces as $mp) @php $mpp = $marketplacePrices[$mp->id] ?? null; @endphp
{{ $mp->name }} @if($mp->defaultCurrency){{ $mp->defaultCurrency->code }}@endif
@endforeach
@else

Bu tura bağlı pazaryeri yok. Ayarlar sekmesinden pazaryeri seçebilirsiniz.

@endif
{{-- ── TARİHLER ── --}}
Tarih Üret (düzenli günlere göre)
Turun düzenli hareket günlerine göre tarihler oluşturulur. "Sil ve yeniden oluştur" yalnızca rezervasyonsuz tarihleri siler.
Yaklaşan Tarihler
@forelse($tour->upcomingDates as $date)
{{ \Carbon\Carbon::parse($date->tour_date)->format('d.m.Y') }} {{ substr($date->start_time ?? $tour->start_time ?? '', 0, 5) ?: '' }} {{ $date->available_seats }} / {{ $date->max_participants ?? $tour->max_participants ?? '—' }} kontenjan {{ $date->is_active ? 'Aktif' : 'Pasif' }}
@empty

Yaklaşan tarih bulunmuyor. Yukarıdan üretebilirsiniz.

@endforelse
{{-- ── GÖRSELLER ── --}}
@include('agency.products._qv-media', [ 'tour' => $tour, 'images' => $tour->activeImages, 'uploadUrl' => route("$editBase.media.upload-images", $tour), 'deleteRoute' => "$editBase.media.delete-image", 'coverRoute' => "$editBase.media.set-cover", 'featuredRoute' => "$editBase.media.toggle-featured", ])
{{-- ── SEO ── --}}
@include('agency.products._qv-seo-inline', ['tour' => $tour, 'editBase' => $editBase, 'uf' => $uf])
{{-- ── AYARLAR ── --}}
@include('agency.products._quick-view-edit-link', ['route' => route("$editBase.settings", $tour), 'label' => 'Ayarları düzenle'])
Durum & Görünürlük
@include('agency.products._qv-field', ['field' => 'is_active', 'label' => 'Aktif', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->is_active ? '1' : '0', 'display' => $tour->is_active ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'is_public', 'label' => 'Yayında', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->is_public ? '1' : '0', 'display' => $tour->is_public ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'is_bookable', 'label' => 'Rezervasyona Açık', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->is_bookable ? '1' : '0', 'display' => $tour->is_bookable ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'is_featured', 'label' => 'Öne Çıkan', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->is_featured ? '1' : '0', 'display' => $tour->is_featured ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'is_bestseller', 'label' => 'Çok Satan', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->is_bestseller ? '1' : '0', 'display' => $tour->is_bestseller ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'is_new', 'label' => 'Yeni', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->is_new ? '1' : '0', 'display' => $tour->is_new ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'instant_booking', 'label' => 'Anında Rezervasyon', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->instant_booking ? '1' : '0', 'display' => $tour->instant_booking ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'refundable', 'label' => 'İade Edilebilir', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->refundable ? '1' : '0', 'display' => $tour->refundable ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'child_friendly', 'label' => 'Çocuk Dostu', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->child_friendly ? '1' : '0', 'display' => $tour->child_friendly ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'infant_allowed', 'label' => 'Bebek Kabul', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->infant_allowed ? '1' : '0', 'display' => $tour->infant_allowed ? 'Evet' : 'Hayır'])
Sayısal Ayarlar
@include('agency.products._qv-field', ['field' => 'priority', 'label' => 'Öncelik', 'type' => 'number', 'display' => $tour->priority ?? 0]) @include('agency.products._qv-field', ['field' => 'booking_deadline_hours', 'label' => 'Rezervasyon Son Süresi (saat)', 'type' => 'number', 'display' => $tour->booking_deadline_hours]) @include('agency.products._qv-field', ['field' => 'cancellation_deadline_hours', 'label' => 'İptal Son Süresi (saat)', 'type' => 'number', 'display' => $tour->cancellation_deadline_hours]) @include('agency.products._qv-field', ['field' => 'published_at', 'label' => 'Yayın Tarihi', 'type' => 'datetime-local', 'current' => $tour->published_at ? \Carbon\Carbon::parse($tour->published_at)->format('Y-m-d\TH:i') : '', 'display' => $tour->published_at ? \Carbon\Carbon::parse($tour->published_at)->format('d.m.Y H:i') : '—']) @include('agency.products._qv-field', ['field' => 'expires_at', 'label' => 'Son Geçerlilik', 'type' => 'datetime-local', 'current' => $tour->expires_at ? \Carbon\Carbon::parse($tour->expires_at)->format('Y-m-d\TH:i') : '', 'display' => $tour->expires_at ? \Carbon\Carbon::parse($tour->expires_at)->format('d.m.Y H:i') : '—'])
{{-- Rezervasyon & Kesin Kalkış --}}
Rezervasyon & Kesin Kalkış
@include('agency.products._qv-field', ['field' => 'auto_guarantee_on_min', 'label' => 'Min. Katılımcıda Otomatik Kesin Kalkış', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->auto_guarantee_on_min ? '1' : '0', 'display' => $tour->auto_guarantee_on_min ? 'Evet' : 'Hayır'])
{{-- Kademeli Ödeme --}}
Kademeli Ödeme Planı
@include('agency.products._qv-field', ['field' => 'payment_plan_enabled', 'label' => 'Kademeli Ödeme Aktif', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->payment_plan_enabled ? '1' : '0', 'display' => $tour->payment_plan_enabled ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'online_payment_enabled', 'label' => 'Web Satışında Kullan', 'type' => 'select', 'options' => $boolOptions, 'current' => $tour->online_payment_enabled ? '1' : '0', 'display' => $tour->online_payment_enabled ? 'Evet' : 'Hayır']) @include('agency.products._qv-field', ['field' => 'online_deposit_percent', 'label' => "Web'de İlk Alınacak (%)", 'type' => 'number', 'display' => $tour->online_deposit_percent])
@foreach(($tour->payment_plan ?? []) as $st)
@endforeach
@include('agency.products._qv-marketplaces', ['allMarketplaces' => $allMarketplaces, 'selectedIds' => $marketplaces->pluck('id'), 'syncUrl' => route("$editBase.sync-marketplaces", $tour)])
{{-- ── ÇEVİRİLER ── --}}
@include('agency.products._qv-translations', ['tour' => $tour, 'marketplaces' => $marketplaces, 'fetchUrl' => route("$editBase.translations.fetch", $tour), 'saveUrl' => route("$editBase.translations.save", $tour)])
@include('agency.products._quick-view-styles') @include('agency.products._qv-general-ui') @include('agency.products._qv-richtext') @include('agency.products._qv-inline-blocks') @include('agency.products._qv-seo-ui') @include('agency.products._quick-view-crud-script')