![]() 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/storage/framework/views/ |
<?php $__env->startSection('stylesheets'); ?> <link href="<?php echo e(asset('css/sweetalert2.min.css')); ?>" rel="stylesheet" type="text/css" /> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="row"> <div class="col-md-12"> <section class="content"> <?php echo $__env->make('layouts.errors-and-messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php if($drivers): ?> <div class="box"> <div class="box-body"> <div class="col-md-12"> <h3 class="bold">Drivers <span class="font-black">|</span> <a href="<?php echo e(route('admin.driver.create')); ?>" class="btn btn-dark">+ Add New</a> <small>- list of drivers available for oil deliveries</small></h3> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="drivers_table"> <thead class="thead-dark"> <tr> <th scope="col" class="all">ID</th> <th scope="col" class="min-mobile-l">Name</th> <th scope="col" class="min-tablet-l">Email</th> <th scope="col" class="min-tablet-l">Phone</th> <th scope="col" class="desktop">Registered</th> <th scope="col" class="min-mobile-l">Status</th> <th scope="col" class="min-mobile-l">Actions</th> </tr> </thead> <tbody> <?php $__currentLoopData = $drivers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $driver): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td class="dtr-control"><?php echo e($driver->id); ?></td> <td><?php echo e($driver->name); ?></td> <td><?php echo e($driver->email); ?></td> <td><?php echo e($driver->phone); ?></td> <td data-sort="<?php echo e(date('Ymd', strtotime($driver['created_at']))); ?>"><?php echo e(date('M d, Y h:i a', strtotime($driver['created_at']))); ?></td> <td><span class="badge font-badge <?php if($driver->status != '1'): ?> badge-danger <?php else: ?> badge-success <?php endif; ?>"><?php if($driver->status != '1'): ?> disabled <?php else: ?> enabled <?php endif; ?></span></td> <td> <form action="<?php echo e(route('admin.driver.destroy', $driver->id)); ?>" method="post" id="remove-from-form" class="form-horizontal"> <input type="hidden" name="row_id" id="" value="<?php echo e($driver->id); ?>"> <?php echo e(csrf_field()); ?> <input type="hidden" name="_method" value="delete"> <div class="btn-group"> <a href="<?php echo e(route('admin.driver.show', $driver->id)); ?>" class="btn btn-default"><i class="fa fa-eye"></i> View</a> <a href="<?php echo e(route('admin.driver.edit', $driver->id)); ?>" class="btn btn-dark"><i class="fa fa-pencil"></i> Edit</a> <button type="submit" id="<?php echo e($driver->id); ?>" title="Delete" class="btn btn-danger delete_submit"><i class="fa fa-times"></i> Delete</button> </div> </form> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> <?php endif; ?> </section> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('js'); ?> <script src="<?php echo e(asset('js/sweetalert2.all.min.js')); ?>"></script> <script type="text/javascript"> $(document).ready( function () { $.fn.DataTable.ext.pager.numbers_length = 5; $('#drivers_table').DataTable({ "responsive": true, "order": [[ 1, "asc" ]], "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' }, "columnDefs": [ { "width": "200px", "targets": 6 } ] }); $('.delete_submit').on('click',function(e) { var refer = $(this).attr("id"); var step_remove_url = $(this).closest("#remove-from-form").attr('action'); e.preventDefault(); e.stopPropagation(); if (refer != '') { Swal.fire({ title: 'Are you sure?', text: "You won't be able to revert this!", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Yes, delete it!' }).then((result) => { if (result.value) { Swal.fire({ title: 'Deleted!', text: "Your driver has been deleted.", type: 'success', showConfirmButton: false, timer: 1500 }); $.ajax({ url: step_remove_url, method: "POST", data: { "_token": "<?php echo e(csrf_token()); ?>", "_method": "delete", row_id: refer }, success:function(response){ setTimeout(function(){ window.location.reload(); }, 1500); } }); } }); } }); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.admin.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/corals/mcoil.corals.io/resources/views/admin/driver/list.blade.php ENDPATH**/ ?>