@include('dnekcab.nimda.header') @if($allProtocols)
@php $i=1; @endphp @foreach($allProtocols as $protocol) @php $protocolPerson = $protocol->persons; $protocolVehicle = $protocol->vehicles; $p=1; $v=1; @endphp @if($allProtocols->total() > 0 ) {{-- // To get the total count of persons in the entire paginator: --}} @foreach($protocolPerson as $person) @endforeach @foreach($protocolVehicle as $vehicle) @endforeach @endif @endforeach
{{ __('protocol.report')}}
{{ __('global.no')}} {{ __('protocol.request_user')}} {{ __('protocol.incoming_organization')}} {{ __('protocol.person_count')}} {{ __('protocol.vehicle_count')}} {{ __('protocol.date')}} {{ __('protocol.entrance_time')}} {{ __('protocol.type')}} {{ __('protocol.created_date')}}
{{ $i++ }} {{$protocol->requestUser->name}} {{$protocol->incomingOrganization->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 @include('dnekcab.nimda.footer')