@extends('agency.layouts.app') @section('title', 'Hizmet Türleri') @section('page_title', 'Hizmet Türleri') {{-- HİZMET TÜRLERİ — acentenin satış kanalları. Etkin türler üstte; her satırda ürün / satış özeti, yönetim sayfası, satış durumları ve (kalkışa bağlı olmayan türlerde) operasyon adımları. Pasif türler için başvuru, sistemde henüz açılmamışlar için "Yakında". --}} @php $tourCodes = ['kultur-turu', 'yurtdisi-turu', 'gunubirlik-tur']; $agencyId = (int) auth()->user()->currentAgencyId(); $statusSvc = app(\App\Services\Sale\SaleStatusService::class); $sorted = $productTypes->sortBy(fn ($t) => [$t->is_active_for_agency ? 0 : ($t->is_active ? 1 : 2), $t->sort_order])->values(); $counts = [ 'all' => $productTypes->count(), 'active' => $productTypes->where('is_active_for_agency', true)->count(), 'passive' => $productTypes->filter(fn ($t) => !$t->is_active_for_agency)->count(), ]; $features = [ 'has_categories' => ['Kategoriler', 'fa-folder-tree'], 'has_pricing' => ['Fiyatlandırma', 'fa-tag'], 'has_booking' => ['Rezervasyon', 'fa-ticket'], 'has_itinerary' => ['Program', 'fa-route'], 'has_dates' => ['Tarihler', 'fa-calendar-days'], ]; @endphp @section('content')

Hizmet Türleri

Acentenizin satış kanalları — ürünler, satış durumları ve operasyon adımları buradan yönetilir.

@forelse($sorted as $type) @php $active = (bool) $type->is_active_for_agency; $system = (bool) $type->is_active; $icon = str_contains((string) $type->icon, ' ') ? $type->icon : 'fas ' . ($type->icon ?: 'fa-cube'); $hasSteps = $active && !in_array($type->code, $tourCodes, true) && $type->code !== 'ekstra-hizmet'; @endphp
{{ $type->name }} @if($active) Etkin @elseif($system) Pasif @else Yakında @endif
@if($type->description)
{{ $type->description }}
@endif
@foreach($features as $flag => [$label, $fIcon]) @if($type->{$flag}) {{ $label }}@endif @endforeach
@if($active)
{{ number_format($type->product_count, 0, ',', '.') }}Ürün
{{ number_format($type->sale_count, 0, ',', '.') }}Satış
{{ $type->activated_at?->translatedFormat('d M Y') ?? '—' }}Etkinleşti
@endif
@if($active) @if($type->manage_url) Yönet @endif
@elseif($system) Başvur @else Sisteme henüz eklenmedi @endif
@empty
Henüz hizmet türü yok Acenteniz için hizmet türü etkinleştirilmemiş.
@endforelse

Yeni hizmet türü eklemek ya da pasife almak için sistem yöneticinizle iletişime geçin.

{{-- Satış durumları / operasyon adımları penceresi (ortak) --}} @endsection @push('styles') @endpush @push('scripts') @endpush