Tashrifat Head
{{ $singleProtocol[0]->location }}
{{ $singleProtocol[0]->queue_number }}
{{ getHijriDate($singleProtocol[0]->date) }}
{{ getJalaliDate($singleProtocol[0]->date) }}
@if($singleProtocol) @php $i=1; @endphp @foreach($singleProtocol as $protocol) @php $protocolPerson = $protocol->persons; $protocolVehicle = $protocol->vehicles; $p=1; $v=1; @endphp @if($singleProtocol ) {{-- // To get the total count of persons in the entire paginator: --}} @foreach($protocolPerson as $person) @endforeach @foreach($protocolVehicle as $vehicle) @endforeach @endif @endforeach
{{ __('global.no')}} {{ __('protocol.request_user')}} {{ __('protocol.person_count')}} {{ __('protocol.vehicle_count')}} {{ __('protocol.date')}} {{ __('protocol.entrance_time')}} {{ __('protocol.type')}} {{ __('protocol.created_date')}}
@php $selectedIds = json_decode($protocol->incoming_organization, true) ?? []; @endphp @if(!empty($selectedIds)) @foreach($selectedIds as $index => $orgId) @php $org = $Organizations->firstWhere('id', $orgId); @endphp @if($org) {{ $org->name }} @else Unknown (ID: {{ $orgId }}) @endif @if($index < count($selectedIds) - 1) ,  @endif @endforeach @else No organizations selected @endif
{{ $i++ }} {{$protocol->requestUser->name}} [{{ $protocol->requestUser->employee->last_name}}] {{$protocol->person_count ?? 0}} {{$protocol->vehicle_count ?? 0 }} {{ getHijriDate($protocol->date) }} {{$protocol->entrance }} @if($protocol->type == 'official') {{__('protocol.official')}} @else {{__('protocol.unofficial')}} @endif {{ getHijriDate($protocol->created_at) }}
{{ __('global.no')}} {{ __('protocol.persons.person_name')}} {{ __('protocol.persons.person_father_name')}} {{ __('protocol.persons.organization')}} {{ __('protocol.persons.person_last_name')}} {{ __('protocol.persons.person_tazkera_number')}} {{ __('protocol.persons.person_phone_number')}} {{ __('protocol.created_date')}}
{{$p++}} {{ $person->name }} {{ $person->father_name }} {{ $person->organization->name }} {{ $person->last_name }} {{ $person->tazkera_number }} {{ $person->phone_number }} {{ getHijriDate($person->created_at) }}

{{ __('global.no')}} {{ __('protocol.vehicles.type')}} {{ __('protocol.vehicles.brand')}} {{ __('protocol.vehicles.pallet_number')}} {{ __('protocol.vehicles.color.header')}} {{ __('protocol.created_date')}}
{{$v++}} @if($vehicle->type == 'car') {{ __('protocol.vehicles.car')}} @else {{ __('protocol.vehicles.motorcycle')}} @endif {{ $vehicle->vehicle->name }} {{ $vehicle->pallet_number }} {{ $vehicle->color }} {{ getHijriDate($vehicle->created_at) }}

@else Query Failed... @endif Tashrifat Head