![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mcoil.corals.io/resources/views/admin/driver/ |
@extends('layouts.admin.app') @section('content') <div class="row"> <div class="col-md-12"> <section class="content"> <div class="box"> <div class="box-body"> <div class="col-md-12"> <h3 class="bold">Driver's Details</h3> <div class="jumbotron"> <div class="row"> <div class="col-md-4 col-xs-12 col-sm-6 col-lg-4"> <div class="col-md-12 initialsadded"> <div class="kt-widget__media"> <span class="kt-badge kt-badge--username kt-badge--unified-success kt-badge--lg kt-badge--rounded kt-badge--bold">@if(!empty($driver->fname)) {{ $driver->fname[0].$driver->lname[0] }} @endif</span> </div> </div> </div> <div class="col-md-5 col-xs-12 col-sm-6 col-lg-5"> <div class="container" style="border-bottom:1px solid #ccc"> <h2><a href="#">{{$driver->name}}</a></h2> </div> <ul class="container details"> <li><p><span class="fa fa-phone one" style="width:50px;"></span>{{$driver->phone}}</p></li> <li><p><span class="fa fa-envelope one" style="width:50px;"></span>{{$driver->email}}</p></li> <li><p><span class="fa fa-calendar one" style="width:50px;"></span>Registered: {{ date('d/m/Y @ h:i a', strtotime($driver->created_at)) }}</p></li> <li><p><span class="fa fa-bell one" style="width:50px;"></span>Status: <span class="badge font-badge @if($driver->status == 1) badge-success @else badge-danger @endif">@if($driver->status == 1) enabled @else disabled @endif</span></p></li> <li><p><span class="fa fa-id-card one" style="width:50px;"></span>Licences: <span class="badge font-badge badge-info">{{$driver->driver_license_1}}</span>@if($driver->driver_license_2) <span class="badge font-badge badge-info">{{$driver->driver_license_2}}</span>@elseif($driver->driver_license_3) <span class="badge font-badge badge-info">{{$driver->driver_license_3}}</span>@elseif($driver->driver_license_4) <span class="badge font-badge badge-info">{{$driver->driver_license_4}}</span>@endif</p></li> <li><p><span class="fa fa-check one" style="width:50px;"></span>Safe Pass: <span class="badge font-badge @if($driver->safe_pass == 'Yes') badge-success @else badge-danger @endif">@if($driver->safe_pass == 'Yes')<span class="fa fa-check"></span>@else<span class="fa fa-times"></span>@endif</span></p></li> <li><p><span class="fa fa-truck one" style="width:50px;"></span>Truck: {{$driver->truck_name}} @if($driver->truck_registration)<span class="badge font-badge">{{$driver->truck_registration}}</span>@endif</p></li> </ul> </div> <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3"> <div class="container margin-top-30"> <div class="btn-margin-top"><a href="{{ route('admin.driver.edit', $driver['id']) }}" class="btn btn-dark btn-block btn-with-icon"><i class="fa fa-pencil"></i> Edit</a></div> <div class="btn-margin-top"><button class="btn btn-danger btn-block btn-with-icon" id="btn_delete_order"><i class="fa fa-trash"></i> Delete</button></div> </div> </div> </div> </div> </div> </div> </div> </section> </div> </div> <div class="row"> <div class="col-md-12"> <section class="content"> <div class="box"> <div class="box-body"> <div class="col-md-12"> <h3 class="bold">Today's Deliveries <span class="font-black">|</span> <a class="btn btn-dark btn-with-icon" href="javascript:void(0);" id="btn_show_deliveries"><i class="fa fa-print"></i> View & Print</a> <span id="buttons"></span></h3> <ul class="nav nav-tabs"> <li class="active"><a data-toggle="tab" href="#Outstanding">Outstanding</a></li> <li><a data-toggle="tab" href="#Completed">Completed</a></li> </ul> <div class="tab-content"> <div id="Outstanding" class="tab-pane fade in active"> <div id="wrapper_print"> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="todays_order_table"> <thead class="thead-dark"> <tr> <th scope="col" class="all">ID</th> <th scope="col" class="min-tablet-l"><label class="print-hide" style="font-weight: normal;">Address</label> <label class="print-show" style="display: none; font-weight: normal;">Customer Details</label></th> <th scope="col" class="desktop">Eircode</th> <th scope="col" class="desktop">Phone</th> <th scope="col" class="min-tablet-l">Delivery</th> <th scope="col" class="min-tablet-l">Product</th> <th scope="col" class="min-tablet-l">Quantity</th> <th scope="col" class="min-mobile-l noExport">Sequence</th> <th scope="col" class="min-mobile-l">P.Status</th> <th scope="col" class="min-tablet-l">O.Status</th> <th scope="col" class="min-mobile-l noExport">Action</th> </tr> </thead> <tbody> @if(count($todayOrders) > 0) @foreach ($todayOrders as $order) <tr> <td class="dtr-control">{{ $order->id }}</td> <td> <div class="print-show" style="display: none;"><strong>{{$order->name}}</strong>, @if($order->business_account_name)<br>{{$order->business_account_name}}, @endif</div> {{ $order->address_1 }}@if ($order->address_2), {{ $order->address_2 }}@endif<?php if ($order->town){ echo ', '.$order->town;} if ($order->county) { echo ', '.$order->county;} ?> </td> <td>{{ $order->zip }}</td> <td>{{ $order->phone }}</td> <td data-sort="{{ date('Ymd', strtotime($order->delivery_date)) }}">{{ date('d/m/Y', strtotime($order->delivery_date)) }}</td> <td> @if(isset($order->cover)) <img src="{{ URL::asset('/public/storage/'.$order->cover) }}" style="height: 15px;width: 15px; margin-right:5px" /> @else <img src="{{ url('/images/default.jpg') }}" style="height: 15px;width: 15px; margin-right:5px" />@endif {{ $order->product_name }}</td> <td>@if(empty($order->quantity)){{ ('Fill the Tank') }}@else{{ $order->quantity }}@endif</td> <td class="td_sequence"><input type="number" class="sequence_input" style="width: 40px;"></td> <td><span class='badge font-badge @if($order->order_status_name == "paid") badge-success @elseif($order->order_status_name == "pending") badge-warning @elseif($order->order_status_name == "awaiting payment") badge-awaiting @elseif($order->order_status_name == "error") badge-danger @else @endif'>{{ $order->order_status_name }}</span></td> <td> <span class="badge font-badge @if($order->order_status == '1') badge-success @else badge-warning @endif">{{ ($order->order_status == '1') ? 'Completed' : 'Pending' }}</span> </td> <td> <div class="btn-group"> <a href="{{ route('admin.orders.show', $order->id) }}" class="btn btn-default"><i class="fa fa-eye"></i> View</a> <a href="" class="btn btn-dark"><i class="fa fa-pencil"></i> Edit</a> </div> </td> </tr> @endforeach @else <tr> <td colspan="11" align="center"> No Data Available </td> </tr> @endif </tbody> </table> </div> </div> <div id="Completed" class="tab-pane fade"> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="order_table_completed"> <thead class="thead-dark"> <tr> <th scope="col" class="all">ID</th> <th scope="col" class="min-tablet-l"><label class="print-hide" style="font-weight: normal;">Address</label> <label class="print-show" style="display: none; font-weight: normal;">Customer Details</label></th> <th scope="col" class="desktop">Eircode</th> <th scope="col" class="desktop">Phone</th> <th scope="col" class="min-tablet-l">Delivery</th> <th scope="col" class="min-tablet-l">Product</th> <th scope="col" class="min-tablet-l">Quantity</th> <th scope="col" class="min-mobile-l noExport">Sequence</th> <th scope="col" class="min-mobile-l">P.Status</th> <th scope="col" class="min-tablet-l">O.Status</th> <th scope="col" class="min-mobile-l noExport">Action</th> </tr> </thead> <tbody> @if(count($completedOrders) > 0) @foreach ($completedOrders as $order) <tr> <td class="dtr-control">{{ $order->id }}</td> <td> <div class="print-show" style="display: none;"><strong>{{$order->name}}</strong>, @if($order->business_account_name)<br>{{$order->business_account_name}}, @endif</div> {{ $order->address_1 }}@if ($order->address_2), {{ $order->address_2 }}@endif<?php if ($order->town){ echo ', '.$order->town;} if ($order->county) { echo ', '.$order->county;} ?> </td> <td>{{ $order->zip }}</td> <td>{{ $order->phone }}</td> <td data-sort="{{ date('Ymd', strtotime($order->delivery_date)) }}">{{ date('d/m/Y', strtotime($order->delivery_date)) }}</td> <td> @if(isset($order->cover)) <img src="{{ URL::asset('/public/storage/'.$order->cover) }}" style="height: 15px;width: 15px; margin-right:5px" /> @else <img src="{{ url('/images/default.jpg') }}" style="height: 15px;width: 15px; margin-right:5px" />@endif {{ $order->product_name }}</td> <td>@if(empty($order->quantity)){{ ('Fill the Tank') }}@else{{ $order->quantity }}@endif</td> <td class="td_sequence"><input type="number" class="sequence_input" style="width: 40px;"></td> <td><span class='badge font-badge @if($order->order_status_name == "paid") badge-success @elseif($order->order_status_name == "pending") badge-warning @elseif($order->order_status_name == "awaiting payment") badge-awaiting @elseif($order->order_status_name == "error") badge-danger @else @endif'>{{ $order->order_status_name }}</span></td> <td> <span class="badge font-badge @if($order->order_status == '1') badge-success @else badge-warning @endif">{{ ($order->order_status == '1') ? 'Completed' : 'Pending' }}</span> </td> <td> <div class="btn-group"> <a href="{{ route('admin.orders.show', $order->id) }}" class="btn btn-default"><i class="fa fa-eye"></i> View</a> <a href="" class="btn btn-dark"><i class="fa fa-pencil"></i> Edit</a> </div> </td> </tr> @endforeach @else <tr> <td colspan="11" align="center"> No Data Available </td> </tr> @endif </tbody> </table> </div> </div> </div> </div> </div> </section> </div> </div> <div class="row"> <div class="col-md-12"> <section class="content"> <div class="box"> <div class="box-body"> <div class="col-md-12"> <h3 class="bold">Other Delivery Orders</h3> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="order_table"> <thead class="thead-dark"> <tr> <th scope="col" class="all">ID</th> <th scope="col" class="min-tablet-l">Address</th> <th scope="col" class="desktop">Eircode</th> <th scope="col" class="desktop">Phone</th> <th scope="col" class="min-tablet-l">Delivery</th> <th scope="col" class="min-tablet-l">Product</th> <th scope="col" class="min-tablet-l">Quantity</th> <th scope="col" class="min-mobile-l">Status</th> <th scope="col" class="min-mobile-l">Action</th> </tr> </thead> <tbody> @if(count($delieveredOrders) > 0) @foreach ($delieveredOrders as $order) <tr> <td class="dtr-control">{{ $order->id }}</td> <td>{{ $order->address_1 }}@if ($order->address_2), {{ $order->address_2 }}@endif<?php if ($order->town){ echo ', '.$order->town;} if ($order->county) { echo ', '.$order->county;} ?></td> <td>{{ $order->zip }}</td> <td>{{ $order->phone }}</td> <td data-sort="{{ date('Ymd', strtotime($order->delivery_date)) }}">{{ date('d/m/Y', strtotime($order->delivery_date)) }}</td> <td> @if(isset($order->cover)) <img src="{{ URL::asset('/public/storage/'.$order->cover) }}" style="height: 15px;width: 15px; margin-right:5px" /> @else <img src="{{ url('/images/default.jpg') }}" style="height: 15px;width: 15px; margin-right:5px" />@endif {{ $order->product_name }} </td> <td>@if(empty($order->quantity)){{ ('Fill the Tank') }}@else{{ $order->quantity }}@endif</td> <td><span class='badge font-badge @if($order->order_status_name == "paid") badge-success @elseif($order->order_status_name == "pending") badge-warning @elseif($order->order_status_name == "awaiting payment") badge-awaiting @elseif($order->order_status_name == "error") badge-danger @else @endif'>{{ $order->order_status_name }}</span></td> <td> <div class="btn-group"> <a href="{{ route('admin.orders.show', $order->id) }}" class="btn btn-default"><i class="fa fa-eye"></i> View</a> <a href="" class="btn btn-dark"><i class="fa fa-pencil"></i> Edit</a> </div> </td> </tr> @endforeach @else <tr><td colspan="9" align="center">No Data Availaible</td></tr> @endif </tbody> </table> </div> </div> </div> </section> </div> </div> <div id="modal_show_deliveries" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="TodaysDeliveries"> <div class="modal-dialog deliveries-modal" role="document"> <div class="modal-content"> <div class="modal-header toolbar hidden-print"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <div class="col-md-2 text-left"> <button class="btn btn-dark btn-lg btn-block font-black printdeliveries-temp btn-with-icon-bg"><i class="fa fa-print"></i> Print</button> </div> </div> <div class="modal-body table-responsive-md" id="modal_body_show_deliveries"> <div id="deliveries_print_copy" style="display: none;"> <div id="deliveries-temp"> <div class="deliveries-temp overflow-auto"> <div class="deliveries-div"> <header> <div class="row row-flex"> <div class="col deliveries-temp-logo"> <img src="{{ asset('/public/img/images_uploaded/'.$setting->header_logo)}}" alt="{{ config('app.name') }}" data-holder-rendered="true" /> </div> <div class="col company-details"> <h2 class="name">{{ $contact_info['contact_name'] }}</h2> <div>{{ $contact_info['address'] }}</div> <div>{{ $contact_info['phone'] }}</div> <div>{{ $contact_info['email'] }}</div> </div> </div> </header> <main> <div class="row row-flex contacts"> <div class="col deliveries-temp-details"> <h1 class="deliveries-temp-driver">{{$driver->name}} - {{ date('d/m/Y') }}</h1> </div> </div> <div id="deliveries_print_inner"></div> </main> </div> <div class="notices"> <h1 class="deliveries-delivery">DELIVERY NOTICE:</h1> <div class="notice"> All deliveries are required to be delivered and on time. Any issues, please contact us on the phone number attached. </div> </div> </div> </div> </div> </div> </div> </div> </div> @endsection @section('js') <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js"></script> <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js"></script> <script type="text/javascript"> $.fn.dataTable.ext.order['dom-text'] = function ( settings, col ) { return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) { return $('input', td).val(); } ); } $(document).ready( function () { $.fn.DataTable.ext.pager.numbers_length = 5; // $('#details_table').DataTable({ // "responsive": true, // "order": [[ 0, "desc" ]], // "bAutoWidth": false, // "rowReorder": { // selector: 'td:nth-child(2)' // } // }); $('#order_table_completed').DataTable({ "responsive": true, "order": [[ 7, "desc" ]], "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' }, }); var table = $('#todays_order_table').DataTable({ "responsive": true, "order": [[ 7, "desc" ]], "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' }, "columns": [ null, null, null, null, null, null, null, { "orderDataType": "dom-text", type: 'string' }, null, null, null ], "columnDefs": [ { "width": "120px", "targets": 9 } ], dom: 'Blfrtip', buttons: [ { extend: 'csv', title: 'Todays Deliveries ({{ date("d-m-Y") }}) - {{$driver->name}}', exportOptions: { columns: "thead th:not(.noExport)" } } ] }); var buttons = new $.fn.dataTable.Buttons(table, { buttons: [ { extend: 'csvHtml5', title: 'Todays Deliveries ({{ date("d-m-Y") }}) - {{$driver->name}}', exportOptions: { columns: "thead th:not(.noExport)" } } ] }).container().appendTo($('#buttons')); $('#todays_order_table_wrapper').find('.dt-buttons').remove(); $('.dt-button').addClass('btn btn-dark btn-with-icon'); $('.dt-button').prepend('<i class="fa fa-download"></i> Download '); $('#order_table').DataTable({ "responsive": true, "order": [[ 4, "desc" ]], "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' }, "columnDefs": [ { "width": "120px", "targets": 8 } ] }); $('#btn_show_deliveries').click(function() { $("#modal_show_deliveries").modal('show'); $('#deliveries_print_inner').html($('#wrapper_print').html()); $('#deliveries_print_inner').find('table').find('th:nth-child(5)').hide(); $('#deliveries_print_inner').find('table').find('th:nth-child(11)').hide(); $('#deliveries_print_inner .print-show').show(); $('#deliveries_print_inner .print-hide').hide(); $('#deliveries_print_inner').find('table').find('th:nth-child(5)').hide(); $('#deliveries_print_inner').find('table').find('th:nth-child(8)').hide(); $('#deliveries_print_inner').find('table').find('th:nth-child(9)').hide(); $('#deliveries_print_inner').find('table').find('th:nth-child(10)').hide(); $('#deliveries_print_inner').find('table').find('td:nth-child(5)').hide(); $('#deliveries_print_inner').find('table').find('td:nth-child(8)').hide(); $('#deliveries_print_inner').find('table').find('td:nth-child(9)').hide(); $('#deliveries_print_inner').find('table').find('td:nth-child(10)').hide(); $('#deliveries_print_inner').find('table').find('td:nth-child(11)').hide(); $('#deliveries_print_inner').find('.row').first().hide(); $('#deliveries_print_inner').find('.row').last().hide(); $('#deliveries_print_inner').find('.dataTables_length').hide(); $('#deliveries_print_inner').find('.dataTables_filter').hide(); $('#deliveries_print_inner').find('.dataTables_info').hide(); $('#deliveries_print_inner').find('.dataTables_paginate').hide(); $('#deliveries_print_copy').show(); $('#deliveries_print_inner').find('table').attr("class", ""); $('#deliveries_print_inner').find('table').attr("id", ""); $('#deliveries_print_inner').find('th').attr("class", "bg-th-grey"); $('#deliveries_print_inner').find('th').attr("id", ""); $('#deliveries_print_inner').find('table').attr("cellspacing", 0); $('#deliveries_print_inner').find('table').attr("cellpadding", 0); $('#deliveries_print_inner').find('th').addClass("bg-th-grey"); }); $('.printdeliveries-temp').click(function() { var outerHTML_text = $(this).closest('.modal-content').find('.deliveries-temp').prop('outerHTML'); Popup($(this).closest('.modal-content').find('.deliveries-temp').prop('outerHTML', outerHTML_text)); function Popup(data) { window.print(); return true; } }); }); </script> @endsection