{{-- ─── Target Section Partial ──────────────────────────────────────── --}}
{{-- ─── Card Header ──────────────────────────────────────────── --}}
Satış Hedefleri
Genel Hedef @if($targetType === 'revenue') ₺{{ number_format($totalTarget, 0, ',', '.') }} @else {{ number_format($totalTarget, 0, ',', '.') }} Adet @endif
Bugün – {{ now()->translatedFormat('d F Y') }} ({{ $yearProgress }}%)
@if($targetPeriod === 'month') {{ \Carbon\Carbon::create(null, $currentMonth)->translatedFormat('F') }} {{ $currentYear }} @else {{ $currentYear }} @endif
{{-- ─── Per-Product Progress Rows ───────────────────────────── --}}
@foreach($salesTargets as $ptId => $t)
{{-- Left: icon + name --}}
{{ $t['name'] }}
Satışları Listele
{{-- Right: values + quick add --}}
@if($targetType === 'revenue') ₺{{ number_format($t['achieved'], 0, ',', '.') }} / ₺{{ number_format($t['target'], 0, ',', '.') }} @else {{ number_format($t['achieved'], 0, ',', '.') }} / {{ number_format($t['target'], 0, ',', '.') }} Adet @endif
%{{ $t['percentage'] }} tamamlandı
{{-- Progress bar --}}
@endforeach @if(empty($salesTargets))

Henüz satış hedefi tanımlanmamış.

@endif
{{-- ─── Genel İlerleme Barı ──────────────────────────────────── --}}
Genel İlerleme @if($targetType === 'revenue') ₺{{ number_format($totalAchieved, 0, ',', '.') }} @else {{ number_format($totalAchieved, 0, ',', '.') }} Adet @endif — %{{ $totalPercentage }}
@if($totalPercentage > 8) %{{ $totalPercentage }} @endif
{{-- Today line --}}
{{-- Period labels --}}
{{ $targetPeriod === 'month' ? '1 ' . \Carbon\Carbon::create(null, $currentMonth)->translatedFormat('F') : '1 Ocak' }} {{-- "Today" label positioned at yearProgress --}} @if($yearProgress > 5 && $yearProgress < 95)
{{ now()->translatedFormat('d M') }}
@endif {{ $targetPeriod === 'month' ? \Carbon\Carbon::create(null, $currentMonth)->daysInMonth . ' ' . \Carbon\Carbon::create(null, $currentMonth)->translatedFormat('F') : '31 Aralık' }}
{{-- Hedef Ayarları Modalı --}} @include('agency.sales.partials.target_modal')