{{-- Müşteri kartı → Yolcular sekmesi. Yolcular klasik tablo düzeninde listelenir: her satır bir yolcu, hücrelerin sağındaki simgeyle değer kopyalanır, satır sonundaki simgeyle yolcunun tüm bilgileri tek seferde alınır. Satırın "Detay" düğmesi altındaki gizli satırı açar; oradaki alanlar Özet sekmesindeki künye paneliyle (.pfx) aynı "defter satırı" dilinde çalışır — yerinde düzenleme ve kaydetme mantığı aynı bileşenden gelir. Beklenen: $customer Kaydetme: PATCH agency.customers.passengers.update-field {field, value} --}} @include('agency.partials.qv-table') @php $today = \Carbon\Carbon::today(); $genderOpts = [['value' => '', 'label' => '—'], ['value' => 'male', 'label' => 'Erkek'], ['value' => 'female', 'label' => 'Kadın'], ['value' => 'other', 'label' => 'Diğer']]; $genderLabel = fn ($v) => collect($genderOpts)->firstWhere('value', (string) $v)['label'] ?? ''; $dmy = fn ($d) => $d ? \Carbon\Carbon::parse($d)->format('d.m.Y') : ''; $iso = fn ($d) => $d ? \Carbon\Carbon::parse($d)->format('Y-m-d') : ''; /** Yolcu satırı: [etiket, alan, ham değer, görünen metin, seçenekler] */ $prow = fn (string $label, ?string $field, $value, ?string $text = null, array $o = []) => [ 'label' => $label, 'field' => $field, 'type' => $o['type'] ?? 'text', 'value' => $value === null ? '' : (string) $value, 'text' => $text === null ? (string) ($value ?? '') : $text, 'options' => $o['options'] ?? null, 'mono' => $o['mono'] ?? false, 'ph' => $o['ph'] ?? null, 'state' => $o['state'] ?? null, ]; @endphp
| Yolcu | Yakınlık | Doğum | Cinsiyet | T.C. Kimlik | Pasaport | Geçerlilik | Telefon | E-posta | |
|---|---|---|---|---|---|---|---|---|---|
| {{ $p->initials }} {{ $p->full_name ?: 'İsimsiz yolcu' }} @if($ppState === 'expired') @elseif($ppState === 'soon')@endif @if($vsState === 'expired')vize@endif | {{ $p->relationship ?: '—' }} | @if($birth){{ $dmy($p->birth_date) }} ({{ $age }})@else—@endif | {{ $genderLabel($p->gender) ?: '—' }} | @if($p->national_id){{ $p->national_id }}@else—@endif | @if($p->passport_number){{ $p->passport_number }}@else—@endif | @if($ppExpiry) {{ $ppExpiry->format('d.m.Y') }} @else — @endif | @if($p->phone){{ $p->phone }}@else—@endif | @if($p->email){{ $p->email }}@else—@endif | |
|
{{ $p->initials }}
{{ $p->full_name ?: 'İsimsiz yolcu' }}
@if($age !== null){{ $age }} yaş@endif
@if($p->relationship){{ $p->relationship }}@endif
@foreach($pSections as $sec)
{{ $sec['title'] }}
@foreach($sec['rows'] as $r)
@php $shown = trim((string) $r['text']); @endphp
{{ $r['label'] }}
@if($r['state'] === 'expired')dolmuş
@elseif($r['state'] === 'soon')yakın@endif
{{ $shown }}
@endforeach
|
|||||||||
| Henüz yolcu kaydı yok Bu müşteriye bağlı kişileri ekleyin — satışlarda ve operasyon yolcu listesinde hazır gelir. | |||||||||