@extends('agency.layouts.app')
@section('title', 'Satış Yönetimi')
@section('page_title', 'Satış Başlangıç Ekranı')
@push('styles')
@endpush
@section('content')
@if($view === 'list')
@php $pt = $productTypes->find(request('product_type_id')); @endphp
{{ $pt ? $pt->name . ' Satışları' : 'Satış Listesi' }}
@else
Satış Başlangıç Ekranı
@endif
{{-- ═══ ÜST ÇUBUK: sekmeler · periyot filtresi · Satış Oluştur (tek satır) ═══
Sekmeler sayfanın adını söylediği için ayrıca büyük başlık yok.
Başarı/hata bildirimleri layout'ta toast olarak gösterilir. --}}
@include('agency.sales.partials.sales_nav_tabs')
@if($view === 'list')
@php $pt = $productTypes->find(request('product_type_id')); @endphp
{{ $pt ? $pt->name . ' Satışları' : 'Satış Listesi' }}
@else
@endif
@include('agency.sales.partials.sales_channels')
{{-- Liste görünümünde (ürün tipi sayfası) ilgili ürün tipi ön-tanımlıdır;
diğer görünümlerde önce ürün tipi seçim modalı açılır. --}}
@if($view === 'list' && request('product_type_id'))
@include('agency.sales.partials._new-sale-btn', [
'onclick' => "openDraftQuickView('" . route('agency.sales.quick-draft', ['product_type_id' => request('product_type_id')]) . "')",
])
@else
@include('agency.sales.partials._new-sale-btn')
@endif
{{-- ═══ DYNAMIC VIEW CONTENT ══════════════════════════════════════════ --}}
@if($view === 'list')
@include('agency.sales.partials.list_view')
@else
@include('agency.sales.partials.target_section')
@endif
@if($view !== 'list')
{{-- Hedef Ayarları Modalı --}}
@include('agency.sales.partials.target_modal')
@endif
@endsection
@push('scripts')
@endpush