Viewing file: index.blade.php (9.2 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.admin') @section('page-title') {{__('Driver')}} @endsection @push('script-page') <script> $(document).ready( function () { $('#driver').DataTable(); } ); </script> @endpush @section('breadcrumb') <li class="breadcrumb-item"><a href="{{route('dashboard')}}">{{__('Dashboard')}}</a></li> <li class="breadcrumb-item">{{__('Driver')}}</li> @endsection @section('action-btn') <div class="float-end"> @can('create driver') <a href="{{ route('driver.request') }}" class="btn btn-primary btn-info btn-sm">{{__('Driver Request')}}</a> <span class="driver-request-counter">{{isset($requested_drivers)?$requested_drivers:'0'}}</span> <a href="#" data-size="lg" data-url="{{ route('driver.create') }}" data-ajax-popup="true" data-bs-toggle="tooltip" title="{{__('Create')}}" data-title="{{__('Create Driver')}}" class="btn btn-sm btn-primary"> <i class="ti ti-plus"></i> </a> @endcan
</div> @endsection
@section('content') @php $profile=\App\Models\Utility::get_file('uploads/avatar/'); @endphp <div class="row"> <div class="col-xl-12"> <div class="card p-2"> <div class="card-body table-border-style"> <div class="table-responsive"> <table id="driver" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th>{{__('Profile Image')}}</th> <th>{{__('Details')}}</th> <th>{{__('License info')}}</th> <th>{{__('Insurance info')}}</th> <th>{{__('Action')}}</th> </tr> </thead> <tbody>
@if ($drivers->isNotEmpty()) @foreach ($drivers as $driver) <tr class="font-style">
<td> <div class="driver-sec-image"> @if (isset($driver->profile_image) && $driver->profile_image) <img src="{{ ($driver->profile_image) ? $profile . $driver->profile_image : $profile . 'avatar.png' }}" class="driver-img" alt=""> @endif </div> </td>
<td> <div class="driver-detials-sec"> <div class="driver-name"> {{__('Name : ')}} {{ isset($driver->name) ? $driver->name : '' }} </div> <div class="driver-email"> {{__('Email : ')}} {{ isset($driver->email) ? $driver->email : '' }} </div> <div class="driver-phone"> {{__('Phone Number : ')}} {{ isset($driver->phone_number) ? $driver->phone_number : '' }} </div> <div class="driver-language"> {{__('Driver Language : ')}} {{ isset($driver->driver_language) ? $driver->driver_language : '' }} </div> <div class="driver-status"> @if(isset($driver->driver_status) && $driver->driver_status == 'inactive') {{__('Driver Status : ')}} <span class="badge badge-danger ">Off Duty</span> @else {{__('Driver Status : ')}} <span class="badge badge-success">On Duty</span> @endif </div> @if($driver->current_location) <div class="driver-language"> {{__('Current Location: ')}} <a href="https://maps.google.com/maps?z=12&t=m&q=loc:{{str_replace(',','+',$driver->current_location)}}" target="_blank">{{ $driver->current_location}}</a> </div> @endif </div> </td> <td> {{ isset($driver->license_info) ? $driver->license_info : '' }}
</td> <td> {{ isset($driver->insurance_info) ? $driver->insurance_info : '' }} </td> <td class="Action">
@can('edit driver') <div class="action-btn bg-success ms-2"> <a href="{{ route('driver.details',$driver->id) }}" class="mx-3 btn btn-sm align-items-center" title="{{__('Edit')}}" data-title="{{__('Edit Driver')}}"> <i class="ti ti-list text-white"></i> </a> </div>
<div class="action-btn bg-info ms-2"> <a href="#" class="mx-3 btn btn-sm align-items-center" data-url="{{ route('driver.edit',$driver->id) }}" data-ajax-popup="true" data-size="lg " data-bs-toggle="tooltip" title="{{__('Edit')}}" data-title="{{__('Edit Driver')}}"> <i class="ti ti-pencil text-white"></i> </a> </div> @endcan @can('delete driver') <div class="action-btn bg-danger ms-2"> {!! Form::open(['method' => 'DELETE', 'route' => ['driver.destroy', $driver->id],'id'=>'delete-form-'.$driver->id]) !!} <a href="#" class="mx-3 btn btn-sm align-items-center bs-pass-para" data-bs-toggle="tooltip" title="{{__('Delete')}}" ><i class="ti ti-trash text-white"></i></a> {!! Form::close() !!} </div> @endcan @if (Auth::user()->type == 'company') @php $user = Auth::user(); @endphp @can('edit driver') <div class="action-btn bg-info ms-2"> <a href="{{route('login.with.driver', $driver->id) }}" class="mx-3 btn btn-sm align-items-center" data-url="{{ route('driver.edit',$driver->id) }}" title="{{__('Login As Driver')}}" data-title="{{__('Login As Driver')}}"> <i class="ti ti-replace text-white"></i> </a> </div> @endcan @endif {{-- @if (Auth::user()->type == 'super admin') <a href="{{ route('login.with.company', $user->id) }}" class="dropdown-item" data-bs-original-title="{{ __('Login As Company') }}"> <i class="ti ti-replace"></i> <span> {{ __('Login As Company') }}</span> </a> @endif --}}
</td>
</tr> @endforeach @else <tr class="font-style text-center"> <td colspan="5">No Data Available</td> </tr> @endif </tbody> </table> </div> </div> </div> </div> </div>
@endsection
|