{{-- Quick-view "Genel Bilgiler" — ANLIK alan-alan inline düzenleme (kaydet butonu YOK). Skalerler _qv-field (blur/Enter → update-field), HTML alanları _qv-quill-inline (blur → update-field), repeater/kategori blokları _qv-inline-blocks (değişince otomatik PATCH). Gerekli: $tour, $editBase, $cities, $categories, $productType ('cultural'|'international'|'day'). Opsiyonel: $uf --}} @php $productType = $productType ?? 'cultural'; $isDay = $productType === 'day'; $categories = $categories ?? collect(); $selectedCatIds = $tour->categories->pluck('id')->toArray(); $uf = $uf ?? route("$editBase.update-field", $tour); // Kalkış noktaları artık üç tur tipinde de var (günübirlik dahil). $transferUrl = route("$editBase.transfer-points", $tour); $catUrl = route("$editBase.categories", $tour); $cityOptions = collect($cities)->map(fn($c) => ['value' => (string) $c->id, 'label' => $c->city ?? $c->name])->values(); $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']]; $transportOptions = ['air' => 'Uçak', 'road' => 'Karayolu', 'train' => 'Tren', 'ferry' => 'Feribot', 'other' => 'Diğer']; $depCityDisplay = optional($tour->departureCity)->city ?? optional($tour->departureCity)->name ?? '—'; $arrCityDisplay = optional($tour->arrivalCity)->city ?? optional($tour->arrivalCity)->name ?? '—'; $flightTime = $tour->flight_departure_time ? \Carbon\Carbon::parse($tour->flight_departure_time)->format('H:i') : ''; // Günübirliğe özel: saatler + tekrar eden günler (statik general.blade ile birebir) $startTime = $isDay && $tour->start_time ? substr((string) $tour->start_time, 0, 5) : ''; $endTime = $isDay && $tour->end_time ? substr((string) $tour->end_time, 0, 5) : ''; $weekdays = ['monday' => 'Pazartesi', 'tuesday' => 'Salı', 'wednesday' => 'Çarşamba', 'thursday' => 'Perşembe', 'friday' => 'Cuma', 'saturday' => 'Cumartesi', 'sunday' => 'Pazar']; $selectedDays = is_array($tour->recurring_days ?? null) ? $tour->recurring_days : []; @endphp {{-- Kalkış Noktaları (departure points) — modern timeline arayüzü --}} {{-- .qv-gform sarmalayıcı: _qv-general-ui'nin ulaşım göster/gizle mantığı bu class'a dayanır (form DEĞİL) --}}
{{-- Temel Bilgiler --}}
Temel Bilgiler
{{-- Tur adı: tam satır + geniş input (uzun adlar için) --}} @include('agency.products._qv-field', ['field' => 'name', 'label' => 'Tur Adı', 'display' => $tour->name, 'itemClass' => 'full mb-3', 'wide' => true])
@include('agency.products._qv-field', ['field' => 'tour_type', 'label' => 'Tur Tipi', 'type' => 'select', 'options' => $tourTypeOptions, 'current' => $tour->tour_type, 'display' => $tour->tour_type_display_name ?? $tour->tour_type, 'wide' => true]) @if($isDay) @include('agency.products._qv-field', ['field' => 'start_time', 'label' => 'Başlangıç Saati', 'type' => 'time', 'current' => $startTime, 'display' => $startTime ?: '—']) @include('agency.products._qv-field', ['field' => 'end_time', 'label' => 'Bitiş Saati', 'type' => 'time', 'current' => $endTime, 'display' => $endTime ?: '—']) @else @include('agency.products._qv-field', ['field' => 'days', 'label' => 'Gün', 'type' => 'number', 'display' => $tour->days]) @include('agency.products._qv-field', ['field' => 'nights', 'label' => 'Gece', 'type' => 'number', 'display' => $tour->nights]) @endif
@include('agency.products._qv-field', ['field' => 'short_description', 'label' => 'Kısa Açıklama', 'type' => 'textarea', 'display' => $tour->short_description])
{{-- Konum Bilgileri (statik general.blade "Konum Bilgileri" ile birebir) --}}
Konum Bilgileri
@include('agency.products._qv-field', ['field' => 'departure_city_id', 'label' => 'Kalkış Şehri', 'type' => 'select', 'options' => $cityOptions, 'current' => (string) $tour->departure_city_id, 'display' => $depCityDisplay, 'wide' => true]) @include('agency.products._qv-field', ['field' => 'arrival_city_id', 'label' => 'Varış Şehri', 'type' => 'select', 'options' => $cityOptions, 'current' => (string) $tour->arrival_city_id, 'display' => $arrCityDisplay, 'wide' => true])
{{-- Kapasite ve Yaş Sınırları (statik general.blade ile birebir) --}}
Kapasite ve Yaş Sınırları
@include('agency.products._qv-field', ['field' => 'min_participants', 'label' => 'Min. Katılımcı', 'type' => 'number', 'display' => $tour->min_participants]) @include('agency.products._qv-field', ['field' => 'max_participants', 'label' => 'Maks. Katılımcı', 'type' => 'number', 'display' => $tour->max_participants]) @include('agency.products._qv-field', ['field' => 'min_age', 'label' => 'Min. Yaş', 'type' => 'number', 'display' => $tour->min_age]) @include('agency.products._qv-field', ['field' => 'max_age', 'label' => 'Maks. Yaş', 'type' => 'number', 'display' => $tour->max_age]) @include('agency.products._qv-field', ['field' => 'difficulty_level', 'label' => 'Zorluk Seviyesi', 'type' => 'select', 'options' => $difficultyOptions, 'current' => $tour->difficulty_level, 'display' => $tour->difficulty_level_display_name ?? $tour->difficulty_level, 'wide' => true])
@include('agency.products._qv-field', ['field' => 'difficulty_description', 'label' => 'Zorluk Açıklaması', 'type' => 'textarea', 'display' => $tour->difficulty_description])
{{-- İçerik (Quill inline) --}}
İçerik
@include('agency.products._qv-quill-inline', ['name' => 'description', 'label' => 'Detaylı Açıklama', 'value' => $tour->description, 'uf' => $uf]) @include('agency.products._qv-quill-inline', ['name' => 'places_to_visit', 'label' => 'Gezilecek Yerler', 'value' => $tour->places_to_visit, 'uf' => $uf])
@include('agency.products._qv-quill-inline', ['name' => 'inclusions', 'label' => 'Fiyata Dahil', 'value' => $tour->inclusions, 'uf' => $uf, 'templates' => $inclusionsTemplates ?? null])
@include('agency.products._qv-quill-inline', ['name' => 'exclusions', 'label' => 'Fiyata Dahil Değil', 'value' => $tour->exclusions, 'uf' => $uf, 'templates' => $exclusionsTemplates ?? null])
@if($isDay) {{-- Tekrar eden günler artık Tarihler sekmesindeki Sezon & Tarih Oluşturucu'dan yönetiliyor (seçim yine turun recurring_days alanında saklanır). --}} {{-- Kalkış Noktaları (günübirlik: ulaşım şekline bağlı değil, her zaman görünür) --}}
Kalkış Noktaları
@include('agency.products._qv-departure-points')
@endif {{-- Ulaşım (kültür/yurtdışı) --}} @unless($isDay)
Ulaşım
@include('agency.products._qv-field', ['field' => 'departure_airports', 'label' => 'Kalkış Havalimanı', 'display' => $tour->departure_airports, 'wide' => true]) @include('agency.products._qv-field', ['field' => 'arrival_airports', 'label' => 'Varış Havalimanı', 'display' => $tour->arrival_airports, 'wide' => true]) @include('agency.products._qv-field', ['field' => 'departure_flight_number', 'label' => 'Uçuş Numarası', 'display' => $tour->departure_flight_number, 'wide' => true]) @include('agency.products._qv-field', ['field' => 'flight_departure_time', 'label' => 'Uçuş Kalkış Saati', 'type' => 'time', 'current' => $flightTime, 'display' => $flightTime ?: '—', 'wide' => true])
@include('agency.products._qv-departure-points')
@include('agency.products._qv-field', ['field' => 'transportation_notes', 'label' => 'Ulaşım Notları', 'type' => 'textarea', 'display' => $tour->transportation_notes])
@endunless {{-- Politikalar --}}
Politikalar
@include('agency.products._qv-hours-unit-field', ['field' => 'cancellation_deadline_hours', 'label' => 'Ücretsiz İptal (kalkıştan önce)', 'hours' => $tour->cancellation_deadline_hours, 'uf' => $uf])
@include('agency.products._qv-quill-inline', ['name' => 'cancellation_policy', 'label' => 'İptal Politikası', 'value' => $tour->cancellation_policy, 'uf' => $uf, 'templates' => $cancellationPolicies ?? null]) @include('agency.products._qv-quill-inline', ['name' => 'terms_conditions', 'label' => 'Şartlar & Koşullar', 'value' => $tour->terms_conditions, 'uf' => $uf, 'templates' => $termsConditions ?? null])
{{-- Kategoriler --}} @php // Hızlı kategori ekleme için ürün tipi id'si $ptSlug = ['cultural' => 'kultur-turu', 'international' => 'yurtdisi-turu', 'day' => 'gunubirlik-tur'][$productType] ?? 'kultur-turu'; $ptId = \App\Models\Product\ProductType::where('slug', $ptSlug)->value('id'); @endphp
Kategoriler
{{-- Seçilebilir chip bulutu: tıkla → seç/kaldır, otomatik kaydedilir --}}
@foreach($categories as $cat) @endforeach
@if(!$categories->count())

Tanımlı kategori yok. Aşağıdan hızlıca ekleyebilirsiniz.

@endif {{-- Hızlı kategori ekle: yazıp Enter/Ekle → oluşturulur, seçili gelir ve tura kaydedilir --}}