@extends('admin.layouts.app') @section('title', 'Driver Document') @section('content')
@csrf @php $i = 1; @endphp @forelse ($neededDocument as $item) @php $count=0; $expiry_date="-"; $driver_doc_id=""; $doc_comment = '-'; $doc_status = ''; @endphp @foreach($driverDoc as $doc_dets) @if($doc_dets->document_id == $item->id) @php $count++; $expiry_date = $doc_dets->expiry_date; $driver_doc_id = $doc_dets->id; $doc_status = $doc_dets->document_status; $doc_comment = $doc_dets->comment; $docImage=$doc_dets->image; @endphp @endif @endforeach @empty @endforelse
@lang('view_pages.s_no') @lang('view_pages.driver_name') @lang('view_pages.document_name') @lang('view_pages.expiry_date') @lang('view_pages.status') @lang('view_pages.comment') @lang('view_pages.action') @lang('view_pages.approval_action')
{{ $i++ }} {{ $driver->name }} {{ $item->name }} {{ $expiry_date }} @if($count == 0) @lang('view_pages.not_uploaded') @else @if ($doc_status == 1) {{ driver_document_name($doc_status) }} @elseif ($doc_status == 5) {{ driver_document_name($doc_status) }} @else {{ driver_document_name($doc_status) }} @endif @endif {{ $doc_comment ?? '-' }} @if($count == 0) @if(auth()->user()->can('fleet-driver-document-edit')) @endif @else @if(auth()->user()->can('fleet-driver-document-view-image')) @endif @endif @if(auth()->user()->can('fleet-driver-document-toggle')) @if($count > 0) @lang('view_pages.approve') @lang('view_pages.decline') @endif @endif

@lang('view_pages.no_data_found')

@if(auth()->user()->can('driver-document-toggle') || auth()->user()->can('driver-document-edit')) @endif
{{-- {{$results->links()}} --}}
@endsection