@if($allProtocols->isEmpty())
@else
@if(auth()->user()->hasPermissionTo('Protocol - Edit Protocol') || auth()->user()->hasPermissionTo('Protocol - Delete Protocol')) @endif @php $counter = ($allProtocols->currentPage() - 1) * $allProtocols->perPage() + 1; @endphp @foreach($allProtocols as $protocol) @php $organizationIds = json_decode($protocol->incoming_organization, true) ?? []; @endphp action == 'approve') class="bg-success text-white" @endif> @if(auth()->user()->hasPermissionTo('Protocol - Edit Protocol')) @endif @if(auth()->user()->hasPermissionTo('Protocol - Delete Protocol')) @endif @endforeach
{{ __('protocol.no')}} {{ __('protocol.request_user')}} {{ __('protocol.incoming_organization')}} {{ __('protocol.person_count')}} {{ __('protocol.vehicle_count')}} {{ __('protocol.date')}} {{ __('protocol.entrance_time')}} {{ __('protocol.type')}} {{ __('protocol.created_date')}}
{{$protocol->requestUser->name ?? '' }} {{$protocol->requestUser?->employee?->last_name ?? '' }} @foreach ($organizationIds as $orgId) @if(isset($selectedOrganizations[$orgId])) {{ $selectedOrganizations[$orgId]->name }} @else Unknown (ID: {{ $orgId }}) @endif @endforeach {{$protocol->person_count}} {{$protocol->vehicle_count}} {{ getHijriDate($protocol->date) }} {{$protocol->entrance}} @if($protocol->type == 'official') {{ __('protocol.official') }} @else {{ __('protocol.unofficial') }} @endif {{ getHijriDate($protocol->created_at) }} action == 'approve') href="{{ route('viewProtocol', ['id'=> encryption($protocol->id) ]) }}" @else href="{{ route('editProtocol', ['id'=> encryption($protocol->id) ]) }}" @endif data-toggle="tooltip" title="@if($protocol->action == 'approve') {{ __('protocol.view')}} @else {{ __('protocol.edit')}} @endif" class="btn btn-outline-primary custom-a btn-sm show-edit-btn" style="font-size: 12px; font-weight: bold;" target="_blank">
@endif